The following archives are provided as a public service to the community. Opinions archived here do not necessarily represent the opinions of Open for Business or its contributors.
David McGlone wrote:
> it seems everything is working except it is not getting inserted into the database.
>
> $query = "UPDATE workshop subheaderText SET NULL,
> subheaderText='".$_POST['subheaderText']."',
> headerText='".$_POST['headerText']."',
> page='".$_POST['pageID']."'
> WHERE subheaderTextID='".$_POST['subheaderTextID']."'";
>
> $query2= "SELECT * FROM subheaderText WHERE subheaderTextid=1";
> $result2= @mysql_query($query2);
You create a string called $query and then never send it to mysql! You
should also test $result after every call to mysql_query; in case the
query fails.
$query = "UPDATE ....
$result = @mysql_query($query);
if (!$result) { die($query.' ERROR: '.mysql_error()); }
$query2= "SELECT * FROM subheaderText WHERE subheaderTextid=1";
$result2= @mysql_query($query2);
if (!$result2) { die($query2.' ERROR: '.mysql_error()); }
| Home |