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
https://forums.phpfreaks.com/topic/231883-help-with-input-type-hidden/
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.

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.