Jump to content

Form _POST help


melting_dog

Recommended Posts

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

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

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.