I am using an html page to pass variables to a php page and I am having a lot of problems. I cannot get the variables to pass to the page by just using the submit button. Here are some of the things I have tried so far: I have tried using php sessions by embedding code into the html page with <?php echo $_SESSION['gender'] ?> . I have tried using echo $_SESSION["gender"]; after converting the html page to php. I have tried $parent=$_POST['parent']; . So far I have not been able to get anything to work. Here is the code for the html page I am trying to pass the variables to. I could really use some suggestions. <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Letter from The Easter Bunny</title> > </head> <form> <div align="center"> <center> <table border="0" width="700" bordercolor="#FFFF00" cellspacing="0" cellpadding="0" bgcolor="#0000FF"> <tr> <td width="100%" bgcolor="#ceceff" valign="top" align="center" style="padding: 3"> <div align="center"> <center> <table border="0" width="670" bordercolor="#CC0000" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#FFFFFF" style="padding-left: 20"> <div align="right"> <table border="0" width="623" cellspacing="0" cellpadding="0"> <tr> <td width="516" valign="top" align="center"> <p align="center"><img border="0" src="images/easter.gif" width="379" height="170"></td> <td width="91" valign="top" align="right"><img border="0" src="images/basket.gif" width="144" height="104"></td> </tr> <tr> <td width="607" colspan="2"> <p align="center"><img border="0" src="images/bar.gif" width="593" height="22"></td> </tr> </table> </div> <div align="left"> <table border="0" width="600" cellspacing="0" cellpadding="0" height="408"> <tr> <td width="142" valign="top" align="left" height="408"><img border="0" src="images/chick.gif" width="100" height="100"> <p align="center"> <p align="center"> <p align="center"> <I> <p> </p> </i> </td> <td width="454" valign="top" align="left" style="border-style: solid; border-width: 1; padding-left: 15; padding-top: 10" height="408"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3">Dear <?php echo $_SESSION['fname'] ?> ,<br> <br> Greetings from the Bunny Hole!<br> <br> I hope you are doing well?. I can't tell you how happy I am to hear what a good <?php echo $_SESSION['gender'] ?> you've been this year. You are already <?php echo $_SESSION["age"] ?> ! It is hard to believe!<br> <br> I am very busy again this year at the Bunny Hole, but I am taking a moment to write a letter personally to <?php echo $_SESSION["fname"] ?> , because you are such a special <?php echo $_SESSION['gender'] ?> to me.<br> <br> We're very excited about our Easter trip this year. I will be coming to <?php echo $_SESSION['place'] ?> on Easter with Mommy Bunny and the baby bunnies. I should not be able to go to every house in <?php echo $_SESSION['place'] ?> . Since you are a special <?php echo $_SESSION['gender'] ?> , I will visit your home to bring you nice presents like <?php echo $_SESSION['favorite'] ?> and all and I hope you will really enjoy it. Don't forget to tell your father <?php echo $_SESSION['father'] ?> and mom <?php echo $_SESSION['mother'] ?> to arrange some snacks for me and a few carrots for the baby bunnies.<br> <br> Goodbye for now. Have a wonderful Easter. </font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"><br> With Love.<br> Your friend,<br> </font> <img border="0" src="images/eb.gif" width="75" height="82"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><i><u><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="5">E</font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="4">aster Bunny .</font></u></i></p> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> <div align="left"> <table border="0" width="442" cellspacing="0" cellpadding="0"> <tr> <td width="442"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"> PS: I haven't been able to write letter to every boy and girl in <?php echo $_SESSION['place'] ?> , so please be sure to tell <?php echo $_SESSION['friend'] ?> that, we'll meet on Easter. </font></td> </tr> </table> </div> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"><br> <br> <br> </font><img border="0" src="images/bar.gif" width="426" height="22"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"> <br> </font> </td> </tr> </table> </div> <I> <p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"></i> <div align="left"> <table border="1" width="600" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#FFFFD9"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"><font face="Verdana,Arial,Helvetica" size="3"><b><u> Prayer</u></b></font> <I> <font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"> <br> <br> </font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="5">"</font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3">O Merciful God, protect Thou me<br> And my dear dad and mom graciously;<br> With Thy strong arm be ever near<br> To brothers and to sisters dear.<br> And all our loved ones in the land,<br> Protect them with Thee own right hand.<br> From sin defend and keep me free;<br> Help me a Christ like child to be. Amen.</font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="5">"</font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"><input type="button" value="Print" name="B1" OnClick = "printme();" style="font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold; background-color: #0000FF; color: #FFFF00"> <input type="button" value="Create another Letter" name="B3" OnClick = "createnew();" style="font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold; background-color: #0000FF; color: #FFFF00"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"></i></td> </tr> </table> </div> <p align="center"><font size="2"><a href="-HOMEPAGE-" target="_blank">© copyright, 2005 -Land Of Oz .us- All rights reserved.</a></font></td> </tr> </table> </center> </div> </td> </tr> </table> </center> </div> </form> <p align="center"> </body> </html> Code (markup):
I have put session_start() on the index page and now I have put it on this page. Still does not work.
A form will only pass on the information given within the <input> tags between the <form></form> tags. Also, the form tags needs to be given more information. I'll give you an example. <form action="whatever.php" method="POST"> <input type="text" name="textfield1" value="hello"><br> <input type="text" name="textfield2" value=""><br> <textarea name="textfield3">large field</textarea><br> <input type="hidden" name="invisible_stuff" value="anything"><br> <input type="submit" value="Click here to submit form"> </form> Code (markup): In the first <form> tag, you have to specify the php site you want the data to be send to, and the method will specify how it is send. Allowed values are "post" and "get" - get is visible in the URL, post is not. It depends on what you want to do. The above code will give you: A text box with the word "hello" in it An empty text field A textarea, which is basically a text fiueld with more than one line, with the words "large field in it" A button with the text "Click here to submit form" The data is posted to variables in the php script(in our case, the file whatever.php in the directory of the file we are talking about here): $_POST["textfield1"] = "hello"; $_POST["textfield2"] = ""; $_POST["textfield3"] = "large field"; $_POST["invisible_stuff"] = "anything"; if you use the GET-method to send data in the script, use $_GET[] instead of $_POST[]. Also, in your script i saw the following piece: <input type="button" value="Print" name="B1" OnClick = "printme();"> Code (markup): You know that this will just call on the javascript function printme()? In case you want to send data TO the html site displayed above, it goes as follows: The the first script you put the following: <?php session_start(); $_SESSION["lala"] = "lol"; session_write_close(); ?> And in the second script: <?php session_start(); echo $_SESSION["lala"]; // will output "lol" ?> Please note that this requires the user to have cookies allowed for your site.
At least I know I am not crazy now. I did some more checking and found if you do a header call you may lose your data and I am. Here are all three pages I am using: index.htm <?php session_start(); $_SESSION['parent'] = $parent; $_SESSION['sendername'] = $sendername; $_SESSION['senderemail'] = $senderemail; $_SESSION['fname'] = $fname; $_SESSION['gender'] = $gender; $_SESSION['age'] = $age; $_SESSION['place'] = $place; $_SESSION['friend'] = $friend; $_SESSION['father'] = $father; $_SESSION['mother'] = $mother; $_SESSION['favorite'] = $favorite; $_SESSION['email'] = $email; session_write_close(); ?> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Letter from the Easter Bunny</title> </head> <body bgcolor="#0000FF" background="images/bkgnd.gif" bgproperties="fixed" topmargin="0"> <div align="center"> <center> <table border="0" width="600" cellspacing="0" cellpadding="0"> <tr> <td width="92" style="padding-top: 2; padding-bottom: 2"><img border="0" src="images/bunny2.gif" width="101" height="101"></td> <td width="418" style="padding-top: 2; padding-bottom: 2" valign="bottom" align="center"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="verdana,arial" size="2" color="#000000"><b>This Free Service Brought To You By:</b></font><br><b><font face="Verdana,Arial,Helvetica" color="#990000" size="6"><u>Land Of Oz .us</u></font></b> </p> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><img border="0" src="images/bar.gif" width="425" height="22"></td> <td width="84" style="padding-top: 2; padding-bottom: 2"><img border="0" src="images/bunny1.gif" width="101" height="101"></td> </tr> </table> </center> </div> <form action="choosetemplate.php" method="post" enctype="multipart/form-data"> <div align="center"> <center> <table border="0" width="600" bordercolor="#000000" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#0000FF" valign="top" align="center" style="padding-top: 2; padding-bottom: 2"> <p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font size="5" color="#FFFF00" face="Verdana,Arial,Helvetica"><b>Letter from the Easter Bunny to your Child</b></font> <p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b><font face="Verdana,Arial,Helvetica" color="#FFFFFF" size="3">Send a Personalized letter by Email Instantly !!</font></b></td> </tr> <tr> <td width="100%" bgcolor="#ceceff" style="padding-left: 20; padding-right: 20; padding-top: 10; padding-bottom: 10"> <div align="center"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="left"><font face="Verdana,Arial,Helvetica" size="2">Delight your child with a personalized letter from the Easter Bunny that they will remember for ever. Our Script personalizes each letter with child's name, gender, age, friend's name, hometown etc and send by email instantly.<br> <br> This service is absolutely free and you can send any number of such personalized letters. <b><a target="_blank" href="example.htm"> Click Here</a></b> <b> to see a sample Letter</b>.</font> <center> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b><u> <font face="Verdana,Arial,Helvetica" color="#000080" size="3">Fill-up the following form and press the button</font> </u></b></p> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> </p> <table border="0" width="490" cellspacing="0" cellpadding="0" bgcolor="#FFFFCC"> <tr> <td width="478" valign="top" align="center" style="padding-right: 3" colspan="2" bgcolor="#0000ff"> <p align="center"><font face="Verdana,Arial,Helvetica" size="2" color="#FFFFFF"><b> <u>Used In Email To Child</u></b></font></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Your Name:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="sendername" size="14"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Your Email Address:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="senderemail" size="14"></td> </tr> <tr> <td width="478" valign="top" align="right" style="padding-right: 3" colspan="2"> </td> </tr> <tr> <td width="478" valign="top" align="center" style="padding-right: 3" colspan="2" bgcolor="#0000ff"> <p align="center"><font face="Verdana,Arial,Helvetica" size="2" color="#FFFFFF"><b> <u>Details of the Child</u></b></font></td> </tr> <tr> <td width="478" valign="top" align="right" style="padding-right: 3" colspan="2"> </td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Child's First Name:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="fname" size="14"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Gender:</b></font></td> <td width="207" style="padding-left: 3"><select size="1" name="gender"> <option selected value="girl">GIRL</option> <option value="boy">BOY</option> </select></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Age:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="age" size="4"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Hometown:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="place" size="20"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Child's best friend:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="friend" size="20"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Select if single parent child:</b></font></td> <td width="207" style="padding-left: 3"><select size="1" name="parent"> <option selected value="boyboth">Boy with both parents</option> <option value="girlboth">Girl with both parents</option> <option value="boymother">Boy Mother Only</option> <option value="girlmother">Girl Mother Only</option> <option value="boyfather">Boy Father Only</option> <option value="girlfather">Girl Father Only</option> </select></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Father's First Name:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="father" size="14"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"><font face="Verdana,Arial,Helvetica" size="2"><b>Mother's First Name:</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="mother" size="14"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Verdana,Arial,Helvetica" size="2"><b> Favorite things:</b></font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Verdana,Arial,Helvetica" size="1">(examples: story books, color pencils, toys.)</font></p> </td> <td width="207" style="padding-left: 3"><input type="text" name="favorite" size="25"></td> </tr> <tr> <td width="271" valign="top" align="right" style="padding-right: 3"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Verdana,Arial,Helvetica" size="2"><b>Email Address:</b></font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Verdana,Arial,Helvetica" size="1" color="#CC0000"><b>(Personalized letter will be sent</b></font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Verdana,Arial,Helvetica" size="1" color="#CC0000"><b>to this email address.)</b></font></td> <td width="207" style="padding-left: 3"><input type="text" name="email" size="25"></td> </tr> <tr> <td width="486" colspan="2"><b><font size="1"><font color="black" face="Arial,Helvetica"> </font></font></b> <p> </p> </td> </tr> <tr> <td width="486" colspan="2"><font size="1"><font color="#000000" face="Verdana,Arial,Helvetica">We respect your privacy. The data being collected will not be forwarded to others</font><font color="black" face="Arial,Helvetica">. </font></font></td> </tr> <tr> <td width="486" colspan="2" style="padding-top: 2; padding-bottom: 2"> <p align="center"><input type="submit" value="To Next Page" style="font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold"></p> </td> </tr> </table> </div> <p> </p> <p></td> </tr> <tr> <td width="100%" bgcolor="#0000FF" valign="top" align="center"> <p align="center"><b><font color="#FFFF00" face="Verdana,Arial,Helvetica" size="1">© copyright, 2005 Land Of Oz .us All rights reserved.</font></b></p> </td> </tr> </table> </div> </form> </body> </html> Code (markup): choosetemplate.php: <?php session_regenerate_id(true); $parent=$_POST['parent']; if(empty($parent)) { die("No Choice Selected"); } elseif ($parent=="boyboth") { header("Status: 200"); header("Location: boyboth.html"); Exit(); } elseif ($parent=="boyfather") { header("Status: 200"); header("Location: boyfather.php"); Exit(); } elseif ($parent=="boymother") { header("Status: 200"); header("Location: boymother.php"); Exit(); } elseif ($parent=="girlboth") { header("Status: 200"); header("Location: girlboth.php"); Exit(); } elseif ($parent=="girlfather") { header("Status: 200"); header("Location: girlfather.php"); Exit(); } elseif ($parent=="girlmother") { header("Status: 200"); header("Location: girlmother.php"); Exit(); } else exit; ?> Code (markup): boyboth.html: <?php session_start() ?> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Letter from The Easter Bunny</title> <SCRIPT language=JavaScript1.2> <!-- Start var isReady = false; function printme() { if (window.print) { window.print(); } else { alert("Sorry, but your browser DOES NOT support this print method.\nPlease close this window and select File ->Print from the Menu."); } }; function createnew() { document.location = "-FORMLOCATION-"; }; // End --> </SCRIPT> </head> <body background="images/bkgnd.gif" bgcolor="#0000FF" onLoad="isReady=true"> <SCRIPT language=JavaScript1.2> <!-- Start var no = 8; // number bubbles var speed = 9; // smaller number moves the bubbles faster var snowflake = "-FORMLOCATION-egg.gif"; var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ns4up) { // set layers if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); document.write(snowflake + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); document.write(snowflake + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } // End --> </SCRIPT> <form> <div align="center"> <center> <table border="0" width="700" bordercolor="#FFFF00" cellspacing="0" cellpadding="0" bgcolor="#0000FF"> <tr> <td width="100%" bgcolor="#ceceff" valign="top" align="center" style="padding: 3"> <div align="center"> <center> <table border="0" width="670" bordercolor="#CC0000" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#FFFFFF" style="padding-left: 20"> <div align="right"> <table border="0" width="623" cellspacing="0" cellpadding="0"> <tr> <td width="516" valign="top" align="center"> <p align="center"><img border="0" src="images/easter.gif" width="379" height="170"></td> <td width="91" valign="top" align="right"><img border="0" src="images/basket.gif" width="144" height="104"></td> </tr> <tr> <td width="607" colspan="2"> <p align="center"><img border="0" src="images/bar.gif" width="593" height="22"></td> </tr> </table> </div> <div align="left"> <table border="0" width="600" cellspacing="0" cellpadding="0" height="408"> <tr> <td width="142" valign="top" align="left" height="408"><img border="0" src="images/chick.gif" width="100" height="100"> <p align="center"> <p align="center"> <p align="center"> <I> <p> </p> </i> </td> <td width="454" valign="top" align="left" style="border-style: solid; border-width: 1; padding-left: 15; padding-top: 10" height="408"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3">Dear <?php echo $_SESSION['fname'] ?> ,<br> <br> Greetings from the Bunny Hole!<br> <br> I hope you are doing well?. I can't tell you how happy I am to hear what a good <?php echo $_SESSION['gender'] ?> you've been this year. You are already <?php echo $_SESSION["age"] ?> ! It is hard to believe!<br> <br> I am very busy again this year at the Bunny Hole, but I am taking a moment to write a letter personally to <?php echo $_SESSION["fname"] ?> , because you are such a special <?php echo $_SESSION['gender'] ?> to me.<br> <br> We're very excited about our Easter trip this year. I will be coming to <?php echo $_SESSION['place'] ?> on Easter with Mommy Bunny and the baby bunnies. I should not be able to go to every house in <?php echo $_SESSION['place'] ?> . Since you are a special <?php echo $_SESSION['gender'] ?> , I will visit your home to bring you nice presents like <?php echo $_SESSION['favorite'] ?> and all and I hope you will really enjoy it. Don't forget to tell your father <?php echo $_SESSION['father'] ?> and mom <?php echo $_SESSION['mother'] ?> to arrange some snacks for me and a few carrots for the baby bunnies.<br> <br> Goodbye for now. Have a wonderful Easter. </font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"><br> With Love.<br> Your friend,<br> </font> <img border="0" src="images/eb.gif" width="75" height="82"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><i><u><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="5">E</font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="4">aster Bunny .</font></u></i></p> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> <div align="left"> <table border="0" width="442" cellspacing="0" cellpadding="0"> <tr> <td width="442"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"> PS: I haven't been able to write letter to every boy and girl in <?php echo $_SESSION['place'] ?> , so please be sure to tell <?php echo $_SESSION['friend'] ?> that, we'll meet on Easter. </font></td> </tr> </table> </div> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"><br> <br> <br> </font><img border="0" src="images/bar.gif" width="426" height="22"><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"> <br> </font> </td> </tr> </table> </div> <I> <p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"></i> <div align="left"> <table border="1" width="600" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#FFFFD9"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"><font face="Verdana,Arial,Helvetica" size="3"><b><u> Prayer</u></b></font> <I> <font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3"> <br> <br> </font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="5">"</font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="3">O Merciful God, protect Thou me<br> And my dear dad and mom graciously;<br> With Thy strong arm be ever near<br> To brothers and to sisters dear.<br> And all our loved ones in the land,<br> Protect them with Thee own right hand.<br> From sin defend and keep me free;<br> Help me a Christ like child to be. Amen.</font><font face="Comic Sans MS,Verdana,Arial,Helvetica" size="5">"</font> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"><input type="button" value="Print" name="B1" OnClick = "printme();" style="font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold; background-color: #0000FF; color: #FFFF00"> <input type="button" value="Create another Letter" name="B3" OnClick = "createnew();" style="font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold; background-color: #0000FF; color: #FFFF00"> <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0" align="center"></i></td> </tr> </table> </div> <p align="center"><font size="2"><a href="-HOMEPAGE-" target="_blank">© copyright, 2005 -Land Of Oz .us- All rights reserved.</a></font></td> </tr> </table> </center> </div> </td> </tr> </table> </center> </div> </form> <p align="center"> </body> </html> Code (markup): I did not want to put all of this code out there but I need a solution. Maybe I made a mistake somewhere?
Try deleting parts that are not needed for testing, and see if it still works. That way, you will find out where the problem is.
I found a fix for my problem and the script is working fine now. I am moving on to the next stage. Maybe you will be able to buy this before long. Too bad there were no volunteers.