I am building a CMS for a client to be able to update pages.
I have a bio table in the mysql database with 7 fields. As there is only one bio I have put in an id of 01 for the bio.
When writing the update function I am attempting to hard code the id into the function as there is only one id.
This is my update code
Code PHP:<?php //Update database $query_updateBio = "UPDATE bio SET headline='".$_POST['headline']."', bio_body='".$_POST['bio_body']."', bio_byline='".$_POST['bio_byline']."', headline_long='".$_POST['headline_long']."', bio_body_long='".$_POST['bio_body_long']."', bio_long_byline='".$_POST['bio_long_byline']."' WHERE bio_id="['01']; $updateBio = mysql_query($query_updateBio); header("Location: ../index.php"); ?>
Am I going about the thought process of the ID the wrong way or do I have the ID coded into the update query incorrect?
Any advice would be appreciated.






Bookmarks