I am still stucking with it. I put all variables with GET on the top of page. Still get some errors after 3 pages.
Error msgs on line 276, 285 and 312 -
http://www.aslrose.com/ecard.php and click one of those pictures, then choose one of those pictures again,
select one of three sentences and fill out the form at the bottom (from, to, and text) use your email so you will see it in the email. Once you get there, you will see the error msgs.
Can you pls help me what I miss?
Code: Select all
<?php
include "const.php";
/*
if ($logged_in != 'yes') {
header("Location: login.php");
exit;
}
*/
$card_n = $_GET[card_n];
$step = $_GET[step];
$var_n = $_GET[var_n];
$var_face = $_GET[var_face];
$phrase_n = $_GET[phrase_n];
$card_url = $_GET[card_url];
$var_n1 = $_GET[var_n1];
$phrase_face = $_GET[phrase_face];
$from = $_GET[from];
$from_email = $_GET[from_email];
$to = $_GET[to];
$to_email = $_GET[to_email];
$txt = $_GET[txt];
?>
<html>
<!-- Creation date: 3/17/2004 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<style>
a.xxx:hover
{
color:FFCCCC;
}
img.xxx
{
}
</style>
</head>
<body bgcolor="#ffffff" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" rightmargin="0" bottommargin="0" style='background-attachment:fixed;'>
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="343"><img src="images/logo_aslrose.gif" border="0" width="343" height="112" alt=""></td>
<td width="119" height="112"><img src="images/rose_middle.gif" border="0" width="119" height="112" alt=""></td>
<td align="left" width="233"><img src="images/rose_topright.gif" border="0" width="114" height="112" alt=""></td>
<td width="200" align="right" valign="top"> <!--
<map name="logout">
<area shape="rect" coords="3,17,79,38" href="login.php?action=logout">
</map><img src="images/nav_logout.gif" border="0" width="110" height="42" alt="" usemap="#logout"> -->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="images/nav_top.gif" border="0" width="174" height="31" alt=""></td>
<td><map name="about">
<area shape="rect" coords="39,3,142,19" href="http://www.aslrose.com/about.php" onMouseOver="document.mtroll.src='images/nav_about_on.gif'" onMouseOut="document.mtroll.src='images/nav_about.gif'">
</map><img src="images/nav_about.gif" border="0" width="152" height="31" alt="" usemap="#about" name="mtroll"></td>
<td><map name="missions">
<area shape="rect" coords="8,3,77,18" href="http://www.aslrose.com/missions.php" onMouseOver="document.mtroll2.src='images/nav_missions_on2.gif'" onMouseOut="document.mtroll2.src='images/nav_missions2.gif'">
</map><img src="images/nav_missions2.gif" border="0" width="80" height="31" alt="" usemap="#missions" name="mtroll2"></td>
<td><map name="history">
<area shape="rect" coords="8,3,77,18" href="http://www.aslrose.com/history.php" onMouseOver="document.mtroll5.src='images/nav_history_on.gif'" onMouseOut="document.mtroll5.src='images/nav_history.gif'">
</map><img src="images/nav_history.gif" border="0" width="80" height="31" alt="" usemap="#history" name="mtroll5"></td>
<td><map name="favorite">
<area shape="rect" coords="26,2,124,20" href="http://www.aslrose.com/favorite.php" onMouseOver="document.mtroll3.src='images/nav_ourfavorite_on.gif'" onMouseOut="document.mtroll3.src='images/nav_ourfavorite.gif'">
</map><img src="images/nav_ourfavorite.gif" border="0" width="127" height="31" alt="" usemap="#favorite" name="mtroll3"></td>
<td><map name="contact">
<area shape="rect" coords="39,1,106,19" href="http://www.aslrose.com/contact.php" onMouseOver="document.mtroll4.src='images/nav_contact_on.gif'" onMouseOut="document.mtroll4.src='images/nav_contact.gif'">
</map><img src="images/nav_contact.gif" border="0" width="175" height="31" alt="" usemap="#contact" name="mtroll4"></td>
<td width="100%"></td>
<!--<td align="right"><img src="images/poem_title_bar_top.gif" border="0" width="187" height="31" alt=""></td> -->
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top"><table cellpadding="0" cellspacing="0" border="0" width="174">
<tr>
<td colspan="2"><a href="http://www.aslrose.com/welcome.php" onMouseOver="document.mtroll50.src='images/nav_welcome2_on.gif'" onMouseOut="document.mtroll50.src='images/nav_welcome2.gif'"><img src="images/nav_welcome2.gif" border="0" width="174" height="32" alt="" name="mtroll50"></a></td>
</tr>
<tr>
<td colspan="2"><a href="http://www.aslrose.com/announcements.php" onMouseOver="document.mtroll6.src='images/nav_announcements2_on.gif'" onMouseOut="document.mtroll6.src='images/nav_announcements2.gif'"><img src="images/nav_announcements2.gif" border="0" width="174" height="33" alt="" name="mtroll6"></a></td>
</tr>
<tr>
<td colspan="2"><a href="http://www.aslrose.com/poem.php" onMouseOver="document.mtroll12.src='images/nav_poem2_on.gif'" onMouseOut="document.mtroll12.src='images/nav_poem2.gif'"><img src="images/nav_poem2.gif" border="0" width="174" height="36" alt="" name="mtroll12"></a></td>
</tr>
<tr>
<td colspan="2"><a href="http://www.aslrose.com/materials.php" onMouseOver="document.mtroll13.src='images/nav_store2_on.gif'" onMouseOut="document.mtroll13.src='images/nav_store2.gif'"><img src="images/nav_store2.gif" border="0" width="174" height="18" alt="" name="mtroll13"></a></td>
</tr>
<tr>
<td colspan="2"><a href="http://www.aslrose.com/request.php" onMouseOver="document.mtroll14.src='images/nav_request2_on.gif'" onMouseOut="document.mtroll14.src='images/nav_request2.gif'"><img src="images/nav_request2.gif" border="0" width="174" height="21" alt="" name="mtroll14"></a></td>
</tr>
<tr>
<td colspan="2"><a href="http://www.aslrose.com/activities.php" onMouseOver="document.mtroll15.src='images/nav_activities2_on.gif'" onMouseOut="document.mtroll15.src='images/nav_activities2.gif'"><img src="images/nav_activities2.gif" border="0" width="174" height="28" alt="" name="mtroll15"></a></td>
</tr>
<tr>
<td width="131" bgcolor="#FFD6D6" valign="top">
<a href="http://www.aslrose.com/ecard.php" onMouseOver="document.mtroll52.src='images/nav_ecards2_on.gif'" onMouseOut="document.mtroll52.src='images/nav_ecards2.gif'"><img src="images/nav_ecards2.gif" border="0" width="120" height="28" alt="" name="mtroll52"></a>
<a href="http://www.aslrose.com/archives.php" onMouseOver="document.mtroll53.src='images/nav_archives2_on.gif'" onMouseOut="document.mtroll53.src='images/nav_archives2.gif'"><img src="images/nav_archives2.gif" border="0" width="120" height="28" alt="" name="mtroll53"></a> <p> </p>
<form action="http://www.aslrose.com/cgi-bin/dada/mail.cgi" method="get">
<input type="hidden" name="list" value="aslroseemaillist" />
<img src="images/spacer.gif">
<input type="radio" name="f" value="subscribe" checked="checked" /> <span style="color:#FF0000"> Subscribe</span><br />
<img src="images/spacer.gif">
<input type="radio" name="f" value="unsubscribe" /><span style="color:#FF0000"> Unsubscribe</span><br />
<img src="images/spacer.gif">
<input type="text" name="email" value="email address" size="16" onFocus="this.value='';" maxlength="1024" />
<img src="images/spacer.gif">
<input type="submit" value="Submit" />
</form> </td>
<td><img src="images/nav_left_bottom.gif" border="0" width="43" height="342" alt=""></td>
</tr><tr>
<td width="131" bgcolor="#FFD6D6"></td>
<td><img src="images/nav_left_bottom2.gif" border="0" width="43" height="342" alt=""></td>
</tr>
<tr>
<td width="131" bgcolor="#FFD6D6"></td>
<td><img src="images/nav_left_bottom.gif" border="0" width="43" height="342" alt=""></td>
</tr>
<tr>
<td width="131" bgcolor="#FFD6D6"></td>
<td><img src="images/nav_left_bottom2.gif" border="0" width="43" height="342" alt=""></td>
</tr>
</table></td>
<td rowspan="11" valign="top" width="100%">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr bgcolor="#ff0000">
<td><img src="images/ecard_title_bar.gif" border="0" width="338" height="32" alt=""></td>
<td height="32">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="32">
<tr>
<td bgcolor="#ff0000"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table cellpadding="5" cellspacing="5" border="0" width="100%">
<tr>
<td width="100%"><font style="COLOR: black; FONT: 9pt/12pt verdana">Choose a picture and download it to insert your photo into the postcard. Or you can choose a picture from the selection here, add a personalized message, and send it off to your loved ones.
<?
include "cfg.php";
if ($_GET[step]==2)
{
// echo "Step 2<br>\n";
echo '<h1>Send an ASL Rose e-card!</h1><br>
Choose a picture:<br>';
$SQL="SELECT * ".
"FROM card_vars WHERE card_n=$_GET[card_n];";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$n=5;
echo ("<div align=center><TABLE align=center border=0 width=\"100%\"><tr>"); $ii=0;
while (($ii>-1)&&($row = mysql_fetch_array($retid))) {
$var_n = $row["var_n"];
$var_face = $row["var_face"];
echo "<td align=center><a class=xxx href=\"ecard.php?step=3&card_n=$card_n&var_n1=$var_n\"><img class=xxx width=200 align=center border=0 src=\"./$card_n/$var_face\"></a></td>";$ii++;
$ii++;
if (($ii%3) == 0)echo "<p></tr><tr>";
}
if (($ii%5)) echo "</tr>";
echo "</table></div>";
}else if ($_GET[step]==3)
{
// echo "Step 3<br>\n";
if ($_GET[card_n]!==23)
{
echo '<h1>Picks a heading</h1><br>';
}
echo "<form action=\"ecard.php\" name=form method=get>";
$SQL="SELECT * ".
"FROM card_phrase WHERE var_n=$_GET[var_n1];";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$n=0;
$i=0;
while (($row = mysql_fetch_array($retid))) {
$phrase_n = $row["phrase_n"];
$phrase_face = $row["phrase_face"];
echo "<input type=radio checked name=phrase_n value=$phrase_n><b>$phrase_face</b><br>";
}
$SQL="SELECT * ".
"FROM card_vars WHERE card_n=$_GET[card_n];";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$n=0;
echo ("<div align=center><TABLE align=center border=0 width=\"100%\"><tr>"); $ii=0;
while (($ii>-1)&&($row = mysql_fetch_array($retid))) {
$var_n = $row["var_n"];
$var_face = $row["var_face"];
if ($var_n1==$var_n)
echo "<td align=center><img class=xxx align=center border=0 src=\"./$card_n/$var_face\"></td>\n"; else {}
//echo "<td align=center><a class=xxx href=\"ecard.php?step=3&card_n=$card_n&var_n1=$var_n\"><img class=xxx width=300 align=center border=0 src=\"./$card_n/$var_face\"></a></td>\n";
$ii++;
}
echo "</tr><tr><td colspan=$ii align=left>";
//echo "<table><tr><td width=30%>Your Name</td><td width=70%><INPUT TYPE=TEXT NAME=from MAXLENGTH=30></td></tr><tr><td width=30%>Your E-mail address</td><td width=70%><INPUT TYPE=TEXT NAME=from_email MAXLENGTH=30></td></tr><tr><td width=30%>Your Friend's Name</td><td width=70%><INPUT TYPE=TEXT NAME=to MAXLENGTH=30></td></tr><tr><td width=30%>Your Friend's E-mail address</td><td width=70%><INPUT TYPE=TEXT NAME=to_email MAXLENGTH=30></td></tr></table>";
echo "<table><tr><td width=30%>Your Name</td><td width=70%><INPUT TYPE=TEXT NAME=from MAXLENGTH=30></td></tr><tr><td width=30%>Your E-mail address</td><td width=70%><INPUT TYPE=TEXT NAME=from_email MAXLENGTH=30></td></tr><tr><td width=30%>Your Friend's Name</td><td width=70%><INPUT TYPE=TEXT NAME=to MAXLENGTH=30></td></tr><tr><td width=30%>Your Friend's E-mail address</td><td width=70%><INPUT TYPE=TEXT NAME=to_email MAXLENGTH=30></td></tr><tr><td width=30%>Enter Your Message</td><td width=70%><TEXTAREA name=txt rows=4 wrap=virtual cols=40></TEXTAREA></td></tr></table>";
//echo "<input type=hidden name=card_n value=$card_n>";
//echo "<input type=hidden name=step value=4>";
echo "<input type=submit value=\"Send Card\"";
echo "</td></tr></table></div></form>";
$card_n = $_GET[card_n];
$step = $_GET[step];
$var_n = $_GET[var_n];
$var_face = $_GET[var_face];
$phrase_n = $_GET[phrase_n];
$card_url = $_GET[card_url];
$var_n1 = $_GET[var_n1];
$phrase_face = $_GET[phrase_face];
$from = $_GET[from];
$from_email = $_GET[from_email];
$to = $_GET[to];
$to_email = $_GET[to_email];
$txt = $_GET[txt];
}else if (isset($phrase_n)==true)
{
$step=4;
$SQL="SELECT * ".
"FROM card_phrase WHERE phrase_n=$_GET[phrase_n];";
//echo "<BR>".$SQL."<BR>";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$row = mysql_fetch_array($retid);
$var_n1 = $row["var_n"];
$phrase_face = $row["phrase_face"];
$SQL="SELECT * ".
"FROM card_vars WHERE var_n=$_GET[var_n1];";
//echo $SQL."<BR>";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$row = mysql_fetch_array($retid);
$card_n = $row["card_n"];
$var_face = $row["var_face"];
$SQL="SELECT * ".
"FROM cards_main WHERE card_n=$_GET[card_n];";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$row = mysql_fetch_array($retid);
$card_url = $row["card_url"];
//echo "<br>var_n1=".$var_n1."<br>card_n=".$card_n."<br>step=".$step."<br>phrase_n=".$phrase_n."<br>";
//$oout="<center><h1>$phrase_face</h1><br><br> <img align=center src=\"$rtpath/$card_n/$var_face\"></center><br><a class=xxx href=\"http://www.aslrose.com/\">http://www.aslrose.com/</a><br><code>From : \"$from\" $from_email<br>To : \"$to\" $to_email</code><br>";
//*********************************************************
$oout='<table align=center><tr><td align=center><a href="http://www.aslrose.com"><img src="'."$rtpath/logo_small.jpg".'"></a></td></tr><tr><td>
';
//********************************
list($width, $height, $type, $attr) = getimagesize("$card_n/$var_face");
$oout.="<a href='$card_url'><table align=center bgcolor='#FFCCCC' width=$width height=$height><tr width=$width><td border=0 wrap width=$width><h5>$phrase_face</h5></td></tr><tr><td border=0 ><img class=xxx src='$rtpath/$card_n/$var_face' width=$width></td></tr><tr border=0 width=$width><td align=center wrap width=$width><h5>$txt<br>\"$from\" <$from_email></h5></td></tr></table></a>";
//********************************
$oout.='
</td></tr></table>
';
//********************************
echo $oout;
$from[0]=strtoupper($from[0]);
$subject = "$from sent you an ASL Rose e-greeting card!";
$headers = "From: $from_email\r\n";
$headers .= "Reply-To: $from_email\r\n";
$headers .= "Return-Path: $from_email\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if ( mail($to_email,$subject,$oout,$headers) ) {
echo "The email has been sent!";
} else {
echo "The email has failed!";
}
}
else
{
echo '<h1>Choose the book cover for e-card.</h1><br>';
$SQL="SELECT * ".
"FROM cards_main ORDER BY num ASC;";
$retid = mysql_db_query($dbname, $SQL, $db);
if (!$retid) { echo( mysql_error()); }
$n=5;
echo ("<div align=center><TABLE align=center border=0 width=\"100%\"><tr>"); $ii=0;
while (($ii>-1)&&($row = mysql_fetch_array($retid))) {
$card_n = $row["card_n"];
$card_face = $row["card_face"];
echo "<td align=center><a class=xxx href=\"ecard.php?step=2&card_n=$card_n\"><img class=xxx width=200 align=center src=\"./$card_n/$card_face\"></a></td>";$ii++;
if (($ii%3) == 0)echo "<p></tr><tr>";
}
if (($ii%5)) echo "</tr>";
echo "</table></div>";
}
?>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
>
</html>
Thanks,
Tony