Jump to content

jahicki

New Members
  • Content Count

    9
  • Joined

  • Last visited

Everything posted by jahicki

  1. Hi Guys & Girls I have this table: $sql = "CREATE TABLE " . $Name . "( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, ItemName VARCHAR(30) NOT NULL, ItemWeight VARCHAR(30) NOT NULL, ItemPrice VARCHAR(5), ItemDate DATE )"; & This Query: $sql = "INSERT INTO Pantry (ItemName, ItemWeight, ItemPrice, ItemDate) VALUES (" . $Name . ", " . $Weight . ", " . $Price . ", " . $Date . ")"; & the response I get is: Error Updating table: Unknown column 'Bacon' in 'field list'. I believe this to be an SQL issue but I don't know what or why. the HTML and PHP is below re
  2. Actually, I'll make a new topic in an SQL Forum... as I don't think this is a PHP issue any more. Thanks guys
  3. I won't be once I get it updating. its a basic SQL database table. the table was created with this code: $sql = "CREATE TABLE " . $Name . "( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, ItemName VARCHAR(30) NOT NULL, ItemWeight VARCHAR(30) NOT NULL, ItemPrice VARCHAR(5), ItemDate DATE )";
  4. Hi guys, thanks for the responses. I removed the JS completely for now, as it isn't required. I changed the Curley Brackets for Square. (Can't remember where I saw the Curley Brackets.) Now I get this: array(4) { ["Item"]=> string(5) "Bacon" ["Weight"]=> string(3) "500" ["Price"]=> string(4) "3.25" ["Date"]=> string(10) "12/12/2020" } ArrayCollecting Data -- Establishing Connection To Database -- Building Query -- Bacon5003.2512/12/2020 -- Inserting Data -- Error creating table: Unknown column 'Bacon' in 'field list $sql = "INSERT INTO Pantry (ItemName, Item
  5. I am new to PHP and Debugging I got this from the Var_Dump: array(1) { ["Submit"]=> string(6) "Submit" } Array Any Help Would Be appreciated.
  6. Hi guys, I have this code: <?php // This Code Works if (isset($_POST{"PantryID"})) { Create_Pantry($_POST{"PantryID"}); } // This Code Isn't Working, Keeps Going To 'Else'. if (isset($_POST{"ItemName"})){ Add_Item($_POST{"ItemName"}, $_POST{"ItemWeight"}, $_POST{"ItemPrice"}, $_POST{"ItemDate"}); }else{ echo "Nothing To do"; } ?> here is the html <label for="PantryID">Create Pantry: </label> <input type="text" id="PantryID" name="PantryID" disabled="true" /> <label for="ItemName">Item Name: </label> <input type="text" id="I
  7. Thankyou for this bit of code. It has done exactly what I needed. though I have not seen it before, Where could I find information on it?
  8. a. Yes the code is posted and the output are correct to my results. maybe the server I am using is having problems. (It is a free server) b. I will have a look at the Flush() statement now, thankyou c. You make a valid point, I will look into this on both sides of my code! Thanks Again.
  9. I have this code: <html> <body> <?php echo date('h:i:s'), "<br>"; sleep(5); echo date('h:i:s'), "<br>"; echo "Your Pizza: ", $_POST["Pizza"]; echo " Has Been Sent To The Counter"; ?> </body> </html> which gives me this result: 07:41:06 07:41:06 Your Pizza: Thin & Crispy, , Garlic, Sweetcorn, Chicken, Bacon, Spicy Beef, Cooked, Has Been Sent To The Counter I can't seem to get the page to sleep at all. My intention is to achieve this a page that will display the message above for 5 seconds then run a relocatio
×
×
  • 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.