Jump to content

php hidden form ???


plodos

Recommended Posts

<?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&notices=$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
Share on other sites

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&notices=$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
Share on other sites

<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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.