Jump to content

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

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.