Jump to content

Help with Input Type Hidden


godrob

Recommended Posts

Hi Guys,

 

Appreciate any help here please...

 

Basically I want to hide some inputs on my registration page and populate them will default values.  Everything works okay, apart from the input below:

 

<input type="hidden" name="seek_location" value="Anywhere">

 

When I use the above, the MYSQL database field for seek_location is left empty...

 

I've noticed that the code below pulls the location into a dropdown list.  You know the kind of thing, Australia, UK, USA etc etc:

 

$seek_location = $wcr[$seek_location];

<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>

 

So, all I want to do is have:

 

<input type="hidden" name="seek_location" value="Anywhere">

 

Populate seek_location with Anywhere

 

Any help appreciated

Thanks

Rob

Link to comment
Share on other sites

$seek_location = 'Anywhere';

 

This may simply just drop the whole dynamically created dropdown box and allow Anywhere to pass to the database.  BUT I don't have the entire script your working with to clearly see what's going on so this is just my guess. The only issue I could see is if there are checks to see if $seek_location equals a set value before it's passed to the database.

Link to comment
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.