$_GET is working but update wont work.

HI all ,

This is driving me crazy so im hoping someone can help me . I have made a registration form which works fine and updates the database. The edit script is displaying the data in the right fields but when i go to update the database at the end of the form it says its worked but hasn’t updated.

the $_GET[‘id’] is set as ive echoed it out to check , when i say update WHERE id =26 this works but not when i say update WHERE id = ‘$id’

below if the update query

Hope someone can help thanks.

Ian

[php]$mysql = mysql_query ("UPDATE acts SET act_name =’$actName’,act_genre = ‘$actGenre’,location = ‘$location’ ,food = ‘$food’ ,drinks = ‘$drinks’, accommodation = ‘$accomodation’,travel_expense = ‘$travelCosts’, extra_fees = ‘$extraFees’,booking_number = ‘$booking_number’,territory_1 =’$territory1’,territory_1_email = ‘$territory_1email’,territory_2 = ‘$territory2’,territory_2_email =’$territory_2email’,act_details = ‘$bio’,facebook=’$facebook’,soundcloud=’$soundcloud’ WHERE id = ‘$id’ ");[/php]

above your sql query use:

[php]$id = $_GET[‘id’];[/php]

Just sorted it i think i was being stupid , i had action as action=“edit.php” ive change it to action="<?php $_SERVER[‘PHP_SELF’] >?;" and its working now .

Thanks for the reply

Sponsor our Newsletter | Privacy Policy | Terms of Service