TimUSA Posted April 2, 2008 Share Posted April 2, 2008 This seams ridiculous that this is not working for me, but when submit is done, this is still displaying the form. /////FORM AND PROCESSING if (!isset ($_POST['cantactform'])){ echo' <form method="POST" name="contactform" action="' .$_SERVER['PHP_SELF']. '"> <textarea name="text" style="position:absolute;width:300px;height:156px;left:266px;top:124px;z-index:10"></textarea> <input name="name" type="text" style="position:absolute;width:300px;left:266px;top:308px;z-index:11"> <input name="club" type="text" style="position:absolute;width:300px;left:266px;top:355px;z-index:12"> <input name="email" type="text" style="position:absolute;width:300px;left:266px;top:403px;z-index:13"> <input name="submit" type="submit" value="submit" style="position:absolute;left:447px;top:433px;z-index:14"> <input name="reset" type="reset" value=" reset " style="position:absolute;left:509px;top:433px;z-index:15"> </form>'; } else { echo 'testing'; } Quote Link to comment Share on other sites More sharing options...
mattennant Posted April 2, 2008 Share Posted April 2, 2008 not sure but is it the spelling of contact if (!isset ($_POST['cantactform'])){ Quote Link to comment Share on other sites More sharing options...
zenag Posted April 2, 2008 Share Posted April 2, 2008 change name of... if (!isset ($_POST['cantactform'])){ as if (!isset ($_POST['contactform'])){ spelling check... Quote Link to comment Share on other sites More sharing options...
TimUSA Posted April 2, 2008 Author Share Posted April 2, 2008 lol Quote Link to comment Share on other sites More sharing options...
TimUSA Posted April 2, 2008 Author Share Posted April 2, 2008 ok good find, but still not working: if (!isset ($_POST['contactform'])){ echo' <form method="POST" name="contactform" action="' .$_SERVER['PHP_SELF']. '"> <textarea name="text" style="position:absolute;width:300px;height:156px;left:266px;top:124px;z-index:10"> </textarea> <input name="name" type="text" style="position:absolute;width:300px;left:266px;top:308px;z-index:11"> <input name="club" type="text" style="position:absolute;width:300px;left:266px;top:355px;z-index:12"> <input name="email" type="text" style="position:absolute;width:300px;left:266px;top:403px;z-index:13"> <input name="submit" type="submit" value="submit" style="position:absolute;left:447px;top:433px;z-index:14"> <input name="reset" type="reset" value=" reset " style="position:absolute;left:509px;top:433px;z-index:15"> </form>'; } else echo'testing'; Quote Link to comment Share on other sites More sharing options...
zenag Posted April 2, 2008 Share Posted April 2, 2008 have u opend braces after else part?... otherwise can u show code were u ur posting contactform ? Quote Link to comment Share on other sites More sharing options...
TimUSA Posted April 2, 2008 Author Share Posted April 2, 2008 here is the full code: <?php echo' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta name="author" content="joao casanova"> <style type="text/css"> /*----------Text Styles----------*/ .ws6 {font-size: 8px;} .ws7 {font-size: 9.3px;} .ws8 {font-size: 11px;} .ws9 {font-size: 12px;} .ws10 {font-size: 13px;} .ws11 {font-size: 15px;} .ws12 {font-size: 16px;} .ws14 {font-size: 19px;} .ws16 {font-size: 21px;} .ws18 {font-size: 24px;} .ws20 {font-size: 27px;} .ws22 {font-size: 29px;} .ws24 {font-size: 32px;} .ws26 {font-size: 35px;} .ws28 {font-size: 37px;} .ws36 {font-size: 48px;} .ws48 {font-size: 64px;} .ws72 {font-size: 96px;} .wpmd {font-size: 13px;font-family: \'Arial\';font-style: normal;font-weight: normal;} /*----------Para Styles----------*/ DIV,UL,OL /* Left */ { margin-top: 0px; margin-bottom: 0px; } </style> <style type="text/css"> div#container { position:relative; width: 566px; margin-top: 0px; margin-left: auto; margin-right: auto; text-align:left; } body {text-align:center;margin:0} </style> </head> <script type="text/javascript"> function noSpam() { if (document.getElementById) { var at = "@"; var id = document.getElementById("mail"); var mail = id.firstChild; var domain = id.lastChild; mail.nextSibling.firstChild.innerHTML = at; id.href = "mailto:" + mail.data + at + domain.data; } } </script> <body onload="noSpam()"> <body background="images/background_firstlight.gif" Link="#000080" VLink="#000080" ALink="#000080"> <div id="container"> <div id="text1" style="position:absolute; overflow:hidden; left:0px; top:94px; width:217px; height:130px; z-index:0"><div class="wpmd"> <div><font class="ws11" color="#333333" face="Trebuchet MS"><B>Dr. Harald Schnitzler</B></font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS">Im Schaber 13</font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS">CH-9450 Lüchingen</font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS">Switzerland</font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS"><BR></font></div> <div><font face="Trebuchet MS"><B><BR></B></font></div> <div><font face="Trebuchet MS"><B><BR></B></font></div> <div><font face="Trebuchet MS"><B> </B></font></div> </div></div> <div id="text2" style="position:absolute; overflow:hidden; left:0px; top:0px; width:212px; height:129px; z-index:1"><div class="wpmd"> <div><font class="ws14" face="Trebuchet MS"><B><BR></B></font></div> <div><font class="ws14" face="Trebuchet MS"><B>Contacts</B></font></div> </div></div> <div id="text3" style="position:absolute; overflow:hidden; left:0px; top:296px; width:210px; height:130px; z-index:2"><div class="wpmd"> <div><font class="ws11" color="#333333" face="Trebuchet MS"><B>Markus Wegmann</B></font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS">Ettaler-Str. 5b</font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS">D-86199 Augsburg</font></div> <div><font class="ws11" color="#333333" face="Trebuchet MS">Germany</font></div> <div><font class="ws11" face="Trebuchet MS"><BR></font></div> <div><font face="Trebuchet MS"><B><BR></B></font></div> <div><font face="Trebuchet MS"><B> </B></font></div> </div></div> <div id="image1" style="position:absolute; overflow:hidden; left:0px; top:185px; width:59px; height:18px; z-index:3"><a href="http://www.skype.com/intl/en-gb/" target="_blank"><img src="images/icon_skype.gif" border=0 width=59 height=18></a></div> <div id="text4" style="position:absolute; overflow:hidden; left:64px; top:185px; width:109px; height:20px; z-index:4"><div class="wpmd"> <div><font face="Trebuchet MS">: harald.schnitzler</font></div> </div></div> <div id="image2" style="position:absolute; overflow:hidden; left:0px; top:390px; width:59px; height:18px; z-index:5"><a href="http://www.skype.com/intl/en-gb/" target="_blank"><img src="images/icon_skype.gif" border=0 width=59 height=18></a></div> <div id="text5" style="position:absolute; overflow:hidden; left:64px; top:390px; width:109px; height:20px; z-index:6"><div class="wpmd"> <div><font face="Trebuchet MS">: markuswegmann</font></div> </div></div> <div id="image3" style="position:absolute; overflow:hidden; left:0px; top:214px; width:77px; height:19px; z-index:7"><a href="mailto:info@velumng.com"><img src="images/botaoemail.gif" border=0 width=77 height=19></a></div> <div id="image4" style="position:absolute; overflow:hidden; left:0px; top:419px; width:77px; height:19px; z-index:8"><a href="mailto:info@velumng.com"><img src="images/botaoemail.gif" border=0 width=77 height=19></a></div>'; /////FORM AND PROCESSING///// if (!isset ($_POST['contactform'])) { echo' <form method="POST" name="contactform" action="' .$_SERVER['PHP_SELF']. '"> <textarea name="text" style="position:absolute;width:300px;height:156px;left:266px;top:124px;z-index:10"> </textarea> <input name="name" type="text" style="position:absolute;width:300px;left:266px;top:308px;z-index:11"> <input name="club" type="text" style="position:absolute;width:300px;left:266px;top:355px;z-index:12"> <input name="email" type="text" style="position:absolute;width:300px;left:266px;top:403px;z-index:13"> <input name="submit" type="submit" value="submit" style="position:absolute;left:447px;top:433px;z-index:14"> <input name="reset" type="reset" value=" reset " style="position:absolute;left:509px;top:433px;z-index:15"> </form>'; } else echo 'testing'; /////END FORM AND PROCESSING///// echo' <div id="text6" style="position:absolute; overflow:hidden; left:266px; top:382px; width:129px; height:21px; z-index:16"><div class="wpmd"> <div><font face="Trebuchet MS">email</font></div> </div></div> <div id="text7" style="position:absolute; overflow:hidden; left:266px; top:334px; width:129px; height:21px; z-index:17"><div class="wpmd"> <div><font face="Trebuchet MS">club</font></div> </div></div> <div id="text8" style="position:absolute; overflow:hidden; left:266px; top:287px; width:129px; height:21px; z-index:18"><div class="wpmd"> <div><font face="Trebuchet MS">name</font></div> </div></div> <div id="text9" style="position:absolute; overflow:hidden; left:266px; top:102px; width:220px; height:23px; z-index:19"><div class="wpmd"> <div><font face="Trebuchet MS">your question on</font><font face="Trebuchet MS"><B> </B></font><font color="#000080" face="Trebuchet MS"><B>Velum</B></font><font color="#FF0000" face="Trebuchet MS"><B>NG</B></font><font face="Trebuchet MS">:</font></div> </div></div> </div></body> </html>'; ?> Quote Link to comment Share on other sites More sharing options...
paul2463 Posted April 2, 2008 Share Posted April 2, 2008 this might be too simple a solution but one worth a try, isset() is a function call, isset () with a space is two strings, put the opening brace right next to the end of the isset Quote Link to comment Share on other sites More sharing options...
TimUSA Posted April 2, 2008 Author Share Posted April 2, 2008 that didnt work either, still just keeps redisplaying the form. have to go to the real job will get back to this later. thanks all! Quote Link to comment Share on other sites More sharing options...
TimUSA Posted April 4, 2008 Author Share Posted April 4, 2008 BUMP. Still cant get this to work, when you submit it just redisplays the form Quote Link to comment Share on other sites More sharing options...
Asheeown Posted April 4, 2008 Share Posted April 4, 2008 </form>'; } else echo 'testing'; see that, even though it's an else it has to be </form>'; } else { echo 'testing'; } Quote Link to comment Share on other sites More sharing options...
TimUSA Posted April 4, 2008 Author Share Posted April 4, 2008 yep tried that just redisplaying the form after submit http://vsk-ayc.totalh.com/Untitled.php Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 4, 2008 Share Posted April 4, 2008 The name of the form isn't passed to PHP. Do you're check on whether or not the Submit button has been pressed: <?php if (!isset($_POST['submit'])) { // // display the form // } ?> Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.