Bizarre error in php
Posted
by Satish
on Stack Overflow
See other posts from Stack Overflow
or by Satish
Published on 2010-06-02T09:03:05Z
Indexed on
2010/06/02
9:13 UTC
Read the original article
Hit count: 225
I have a form in index.php
<?php
echo '<form action="update_act.php" method="POST">';
echo '<input type="submit" name="'.$row['act_name'].'" value="edit">
echo </form>
?>
Here $row['act_name'] is a value fetched from database.
My update_act.php file is
<?php
echo "Old Activity Name : ".$_POST['$row[\'act_name\']'];
?>
But I am getting an error Undefined index: $row['act_name'] in C:\wamp\www\ps\activity\update_act.php
.
I want to have different names for different submits
but I am not able to get its value in another page. Is there any way for it?
© Stack Overflow or respective owner