Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.