plodos Posted March 1, 2008 Share Posted March 1, 2008 <?php $title = $_REQUEST['title']; $date = $_REQUEST['date']; $notices = $_REQUEST['notices']; echo " <br >outout is <br><br> $title $date <br><br> $notices<br> "; echo "<td><a href=\"addnotices.php?title=$title&date=$date¬ices=$notices\"> edit! </a> <br>"; <form action="sendnotices.php" method="post"> <INPUT TYPE=hidden NAME="title" VALUE='.$_GET['title'].'> <INPUT TYPE=hidden NAME="date" VALUE= '. $_GET['date'].' > <INPUT TYPE=hidden NAME="notices" VALUE='.$_GET['notices'].' > <input name="Submit" type="submit" value="SEND to list and SAVE to the Dbase"/> </form> ?> at first, i used $title = $_REQUEST['title']; this for show the output!!! and if the outpus is tru user will click to button for SEND and SAVE to database... anyway i want to use one more time these variables $title,$date,$notice inside of the hidden form like <INPUT TYPE=hidden NAME="title" VALUE='.$_GET['title'].'> ...... but this from is not sending the values to another page.. could you check it please? maybe I didnt see the errors? thnx for everything!... Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/ Share on other sites More sharing options...
ILYAS415 Posted March 1, 2008 Share Posted March 1, 2008 try using... <?php $title = $_REQUEST['title']; $date = $_REQUEST['date']; $notices = $_REQUEST['notices']; echo " <br >outout is <br><br> $title $date <br><br> $notices<br> "; echo "<td><a href=\"addnotices.php?title=$title&date=$date¬ices=$notices\"> edit! </a> <br>"; ?> <form action="sendnotices.php" method="post"> <INPUT TYPE=hidden NAME="title" VALUE='<?= $title ?>'> <INPUT TYPE=hidden NAME="date" VALUE= '<?= $date ?>' > <INPUT TYPE=hidden NAME="notices" VALUE='<?= $notices ?>' > <input name="Submit" type="submit" value="SEND to list and SAVE to the Dbase"/> </form> Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/#findComment-481104 Share on other sites More sharing options...
plodos Posted March 1, 2008 Author Share Posted March 1, 2008 thnx... Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/#findComment-481108 Share on other sites More sharing options...
ILYAS415 Posted March 1, 2008 Share Posted March 1, 2008 lol is it working now? ur thnx sounded a bit sarcastic thats why Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/#findComment-481110 Share on other sites More sharing options...
AndyB Posted March 1, 2008 Share Posted March 1, 2008 <INPUT TYPE=hidden NAME="title" VALUE='<?= $title ?>'> Stuff like that is poor html and may result in failures. It will definitely fail when short_tags are not enabled. The example below is a much better approach: <input type="hidden" name="title" value="<?php echo $title;?>"> Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/#findComment-481131 Share on other sites More sharing options...
ILYAS415 Posted March 1, 2008 Share Posted March 1, 2008 why is it bad to use <?= $title ?>? or were u referring to the quotes used around the thing? Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/#findComment-481135 Share on other sites More sharing options...
AndyB Posted March 1, 2008 Share Posted March 1, 2008 why is it bad to use <?= $title ?>? or were u referring to the quotes used around the thing? Because unless short_tags is enabled in php, that'll do nothing. Link to comment https://forums.phpfreaks.com/topic/93892-php-hidden-form/#findComment-481138 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.