html and database fields ?

hey
i wanna to have to fields to write in and then update to the database

this code let you write in fields to update the database and also show the current value
[php]
echo ‘Personlighet:
’;
echo ‘’;
[/php]

[php]$Personlighet = mysql_real_escape_string($_POST[‘Personlighet’]);[/php]
and this one update the database
[php]mysql_query(“UPDATE members SET Personlighet = '”. $Personlighet ."’, WHERE id = ‘". $_SESSION[‘id’] ."’") or die(mysql_error());
[/php]

i want to do the same but intead of using “text input” , i wanna use

how do i do it while using

have not idea how to get it to work ?

[code]echo 'cm:

älska kankse imon Audi ';[/code]

thanks

The name of the select is the POST variable name so would be $_POST[‘boende’]

Your name for the select is bad "Boende: " this would be better “boende”
[php]$_POST['Boende: '][/php]

[php]$_POST[‘boende’][/php]

[code]
echo 'cm:

älska kankse imon Audi ';[/code]

it did not work

[php]echo 'cm:

älska kankse imon Audi ';[/php]

[php]mysql_query(“UPDATE members SET Personlighet = '”. $Personlighet ."’, boende = ‘". $boende ."’ WHERE id = ‘". $_SESSION[‘id’] ."’") or die(mysql_error());
[/php]

You have not assigned a variable to your post variable.
You should read twice then write code.

what you mean ?

[php]$boende = $_POST[‘boende’];[/php]

yh i already have that , but forget to post it in the above reply

Then you should post the full code not half of it.

i believe that this is the full code

Sponsor our Newsletter | Privacy Policy | Terms of Service