Jump to content

Simple Update Form Not Working


anne3marie

Recommended Posts

I have a form which post to this page and the update is not happening. What did I do wrong? I also tried removing the where clause to see if that was the problem but it still did not work. Thanks!

 

<?php
include 'db.php';

session_start();

$user=$_SESSION['userid'];

$box_selection=$_POST["box_selection"];

$agree=$_POST["agree"];

$payment=$_POST["payment"];




$sql = mysql_query("Update grocery_cart SET order_size='$box_selection', pp_check='$agree', payment='$payment' WHERE userid='$user'");

if(!$sql){
echo 'Your request was not submited, please contact NewLeaf Delivery';include'sign_up.php';}
else{
echo "Your request has been received";include 'signed_up.php';
}

?>

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/264423-simple-update-form-not-working/
Share on other sites

Yes I am getting Your request was not submitted, please contact NewLeaf Delivery' If I place my query in a variable, I simple then echo the variable? Didn't I place my query in a variable? $sql is my variable. I am very new to this. How would I do that exactly?

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.