In this tutorial I teach you how to insert values into the database, another important part of databases as you need a way always for users to add comments on your website or by them storing information on your guest book or forum etc.
I have a form page to add user information to a database and I want some of the fields to be optional. If all fields are filled in, it works perfectly. But if any of the form fields are blank, nothing adds. How do I get the blank form fields to translate into simply leaving the database field blank?
i dont understand, why is there the $sign.INSERT INTO `trialtable` (`email`, `name`, `country`, `url`, `pending`, `password`, `showemail`, `showurl`, `added`) VALUES..?
@simeon310 variables can't have spaces.
monofono2006 2 months ago
Thanks by the way for the tutorial. My question is why the code did not work. Here is the code for reference:
$name = "John";
$last name = "Doe";
$query = mysql_query("insert into customer values ('','$name', '$last name')");
Thanks Again
simeon310 3 months ago
I have a form page to add user information to a database and I want some of the fields to be optional. If all fields are filled in, it works perfectly. But if any of the form fields are blank, nothing adds. How do I get the blank form fields to translate into simply leaving the database field blank?
BiggestOfDaddies 3 months ago
Try to increase the volume in your sound settings
CALAVIDEOS2013 7 months ago
loud up your microphone please.. :(
i hear your typing keyboard louder than your voice.. :(
Ruzdee 8 months ago
Tnx..:D it works..:D
PrototypeZZ 9 months ago
i dont understand, why is there the $sign.INSERT INTO `trialtable` (`email`, `name`, `country`, `url`, `pending`, `password`, `showemail`, `showurl`, `added`) VALUES..?
ikalwewe 10 months ago
@anaik1 The sound is fine.
HuumeKauppias 1 year ago
What? Information seems great, but can barely hear a word you are saying! It's a shame too, you seem very knowledgeable.
anaik1 1 year ago
@naruto3zo Thanks for that, that was the missing piece I was looking for, now I can get on with the real application of MySQLing... Cheers!!!
philnauer 1 year ago