Evanthes Posted August 11, 2006 Share Posted August 11, 2006 Hey guys im making a submit form function and for some reason it is just sending all the data to the same page instead of added.php like it should. could someone take a look at my code and let me know why its not doing that? much appreciated![code=php:0]function addnew(){ global $today, $searchterm; echo "<form action='inserted.php' method='get'>"; echo '<tr><td>'; echo "<textarea name=id rows=0 cols=25>$searchterm</textarea>"; echo '</td>'; echo "<td>"; echo "<textarea name=comments rows=0 cols=25>N/A</textarea>"; echo '</td><td>'; echo "<textarea name=date rows=0 cols=25>".$today."</textarea>"; echo '</td><td>'; echo "<input type='submit' value='submit'"; echo '</td>'; echo '</tr>'; echo '</form>';}[/code] Quote Link to comment Share on other sites More sharing options...
corbin Posted August 11, 2006 Share Posted August 11, 2006 Uhhhh... For it to out put on any page besides its self it will need to be included and then the function called on that page. Quote Link to comment Share on other sites More sharing options...
mewhocorrupts Posted August 11, 2006 Share Posted August 11, 2006 [code]<?phpfunction addnew(){ global $today, $searchterm; echo "<form action='inserted.php' method='get'>"; echo '<tr><td>';.....?>[/code]So, if it's supposed to submit to "added.php" then your issue is that your form doesn't point to that page, it points to "inserted.php". I may be acting on a typo here, so let me know. Quote Link to comment Share on other sites More sharing options...
Evanthes Posted August 11, 2006 Author Share Posted August 11, 2006 [quote author=corbin link=topic=103890.msg414029#msg414029 date=1155317936]Uhhhh... For it to out put on any page besides its self it will need to be included and then the function called on that page.[/quote]yeah i know...thanks for the help though i found the problem Quote Link to comment Share on other sites More sharing options...
mewhocorrupts Posted August 12, 2006 Share Posted August 12, 2006 Post the solution for posterity. 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.