melting_dog Posted March 26, 2012 Share Posted March 26, 2012 Hi All, I am having a bit of difficulty with a form I've built that has some PHP elements in it. The issue is it is just not sending the values (which are in hidden fields). Code is: while($row = mysql_fetch_array($result)){ echo '<tr style="padding: 15px;">'; echo '<td>' . $row['product_id'] . '</td>'; echo '<td>' . $row['name'] . '</td>'; echo '<td>' . $row['catalogue_id'] . '</td>'; ?> <td> <form method="post" enctype="multipart/form-data" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>"> <!--Hidden Field Checks to see if form has already been sent--> <input type="hidden" name="editform" value="Y"> <!--Hidden Fields for Edit Job--> <input type="hidden" name="prodid" value="<?php echo $row['product_id'] ?>"> <input type="hidden" name="prodname" value="<?php echo $row['name'] ?>"> <input type="hidden" name="catalogue_id" value="<?php echo $row['catalogue_id'] ?>"> <input type="hidden" name="full_description" value="<?php echo $row['full_description'] ?>"> <input type="submit" name="Edit" value="<?php _e('Edit', 'pmimp_trdom' ) ?>" /> </form> </td> Would it have something to do with splitting up the php tags? Any help would be apprecited! Thanks! Link to comment https://forums.phpfreaks.com/topic/259731-form-_post-help/ Share on other sites More sharing options...
AyKay47 Posted March 26, 2012 Share Posted March 26, 2012 1. the form action can just be action='' 2. Have you looked at a view source to make sure the values are what you expect them to be? 3. what does the function _e() do? Link to comment https://forums.phpfreaks.com/topic/259731-form-_post-help/#findComment-1331183 Share on other sites More sharing options...
melting_dog Posted March 26, 2012 Author Share Posted March 26, 2012 1. the form action can just be action='' 2. Have you looked at a view source to make sure the values are what you expect them to be? 3. what does the function _e() do? Hi AyKay, Thanks for the response. To answer your questions: 1 and 3: I am actually making a Wordpress Plugin so these things are actually necessary (apparently) 2: No values are being sent whatsoever Cheers Link to comment https://forums.phpfreaks.com/topic/259731-form-_post-help/#findComment-1331186 Share on other sites More sharing options...
AyKay47 Posted March 26, 2012 Share Posted March 26, 2012 Tell me exactly what a view source shows. Are the forms there but they simply have no values at all? Link to comment https://forums.phpfreaks.com/topic/259731-form-_post-help/#findComment-1331189 Share on other sites More sharing options...
melting_dog Posted March 27, 2012 Author Share Posted March 27, 2012 Tell me exactly what a view source shows. Are the forms there but they simply have no values at all? Sorry Im not sure what you mean exactly. The values in the hidden fields are just not being sent to the receiving page... Link to comment https://forums.phpfreaks.com/topic/259731-form-_post-help/#findComment-1331502 Share on other sites More sharing options...
cpd Posted March 27, 2012 Share Posted March 27, 2012 Right click your web page, click "View source"/"View page source" or go through the Settings in some browsers... or CTRL+U... Link to comment https://forums.phpfreaks.com/topic/259731-form-_post-help/#findComment-1331526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.