Jump to content

Passing of Parameters


Gayatri19Sawant

Recommended Posts

<?php  
while($row=mysql_fetch_array($data1))
{
 echo "<li><input type='checkbox' name='listitem[]'  value='".$row['cat']."'>".$row['cat'];
 
}
echo $row[1];
?>
<br/>
<input type="submit" value="send" />
 
<?php
    foreach($_POST['listitem'] as $value)
    {
?>
<a href="cloud.php?q=<?php echo $value; ?>"></a>
<?php
//echo "<a href=cloud.php?p=+'".$value."' target='_blank'></a>";
   echo 'Checked: '.$value.'';
    }
?>
 

i need to send $value parameter to another page.. the above is my code snippet.

 

thank you in advance

Link to comment
https://forums.phpfreaks.com/topic/285788-passing-of-parameters/
Share on other sites

You may need to be more specific about what you are trying to do, but one thing that seems off to me is that you don't have anything inside your anchor tag, so unless you have some css marking up all links on your page, you aren't outputting anything to actually click on. So perhaps your issue is that you need to put something in your link tag so you have something to click on, ex:

<a href="cloud.php?q=<?php echo $value; ?>">click me!</a>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.