pixeltrace Posted August 19, 2006 Share Posted August 19, 2006 guys,i need help on this, i have to page1 - for the form page (wherein i fill up the form and submit)2 - confirmation page (this page will check the data and submit it to my database)my problem is i keep on getting the error messages that i made although the fields that needs to befillup are inputted.also i have a condition here- if my $EventImage is fillup, it will submit '2' as the value of $EventImageLink otherwise, it will submit '1' as its value- if $Eventpopup is not filled up, it will just submit '1' as the value of $Eventpopup Quote Link to comment https://forums.phpfreaks.com/topic/18053-help-on-my-submitting-updates-to-database/ Share on other sites More sharing options...
pixeltrace Posted August 19, 2006 Author Share Posted August 19, 2006 this is the script for my form page--------------------<TBODY> <TR><TD vAlign=top><form id="form1" name="form1" method="post" action="eventupdate.php"> <table width="761" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="435"><table width="431" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" class="bodytext3">Add Sinagtala Events Here </td> </tr> <tr> <td colspan="2"><img src="../images/spacer.gif" width="10" height="30" /></td> </tr> <tr> <td width="97" class="bodytext3">Event Title: </td> <td width="334"><input name="EventTitle" type="text" class="newsletter" size="50" maxlength="100" /> </td> </tr> <tr> <td colspan="2" class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></td> </tr> <tr> <td class="bodytext3">Event Type : </td> <td><input name="EventType" type="text" class="newsletter" size="50" maxlength="100" /></td> </tr> <tr> <td class="bodytext3"> </td> <td><span class="bodytext2">event types:</span><span class="bodytext6"> corporate, past, private, sponsored, tour</span> </td> </tr> <tr> <td colspan="2" class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></td> </tr> <tr> <td class="bodytext3">Event Date </td> <td><input name="EventDate" type="text" class="newsletter" size="20" maxlength="100" /> <span class="bodytext2">Format:</span><span class="bodytext6"> YY MD (eg. 2005 jan01)</span> </td> </tr> <tr> <td class="bodytext3">Description:</td> <td><textarea name="EventDescription" cols="50" rows="10" class="newsletter2"></textarea></td> </tr> <tr> <td colspan="2" class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></td> </tr> <tr> <td class="bodytext3">image name: </td> <td><input name="EventImage" type="text" class="newsletter" size="25" maxlength="100" /> </td> </tr> <tr> <td class="bodytext3"> </td> <td> <span class="bodytext2">* image name is the image filename</span></td> </tr> <tr> <td colspan="2" class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></td> </tr> <tr> <td class="bodytext3">pop-up link </td> <td><input name="Eventpopup" type="text" class="newsletter" size="25" maxlength="100" /></td> </tr> <tr> <td class="bodytext3"> </td> <td> <span class="bodytext2">* pop-up link is the pop-up pagename </span></td> </tr> <tr> <td colspan="2"><img src="../images/spacer.gif" width="10" height="10" /></td> </tr> <tr> <td> </td> <td><input class="mybutton" type="submit" name="Submit" value="SUBMIT" /></td> </tr> <tr> <td colspan="2"> </td> </tr> </table></td> <td width="11"><span class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></span></td> <td width="1" bgcolor="#A2330F"><span class="bodytext3"><img src="../images/spacer.gif" width="1" height="10" /></span></td> <td width="11"><span class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></span></td> <td width="292" valign="top"><div align="center" class="bodytext3"><br><br>On this page, you can add Sinagtala Events<br> using the form on the left side. </div></td> <td width="11"><span class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" /></span></td> </tr> </table> </form>---------------------------- Quote Link to comment https://forums.phpfreaks.com/topic/18053-help-on-my-submitting-updates-to-database/#findComment-77336 Share on other sites More sharing options...
pixeltrace Posted August 19, 2006 Author Share Posted August 19, 2006 this is the sript for my confirmation page--------------------http://www.sinagtala.net/eric/eventupdate.phps--------------------thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/18053-help-on-my-submitting-updates-to-database/#findComment-77337 Share on other sites More sharing options...
Jeremysr Posted August 19, 2006 Share Posted August 19, 2006 In the long if statement that checks to see if the fields were inputted, two of them don't have exclamation marks. ($EventImage and $Eventpopup)So the if statement returns true no matter what. So either remove those two from the if statement or add exclamation marks to them like the others. Quote Link to comment https://forums.phpfreaks.com/topic/18053-help-on-my-submitting-updates-to-database/#findComment-77338 Share on other sites More sharing options...
pixeltrace Posted August 19, 2006 Author Share Posted August 19, 2006 i just remove the $eventimage and $eventpopupand then, i tried checking it by filling up all the fields in the formand this is the error message after clicking the submit button---------------You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '', '')' at line 2---------------whats wrong with my script?i need help on thisthanks! Quote Link to comment https://forums.phpfreaks.com/topic/18053-help-on-my-submitting-updates-to-database/#findComment-77359 Share on other sites More sharing options...
AndyB Posted August 19, 2006 Share Posted August 19, 2006 $EventImageLink' should be [b]'[/b]$EventImageLink' in the SQL query Quote Link to comment https://forums.phpfreaks.com/topic/18053-help-on-my-submitting-updates-to-database/#findComment-77362 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.