Hello ,how i can insert variabl empty in my db my example ↓ i want to let pass and email empty ! How i can do that please help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hello ,how i can insert variabl empty in my db my example ↓ i want to let pass and email empty ! How i can do that please help

$name=$_POST['name']; $req=$bdd->query('insert into table(name,pass,email) values(?,?,?)'); $req-> execute(array($name,...));

13th Jun 2018, 5:22 PM
Ahlam
Ahlam - avatar
3 Answers
+ 3
$name=$_POST['name']; $query="insert into test_db(name) values($name);" if(!$query){ die("error") }
13th Jun 2018, 5:29 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
i'm using Pdo , and if i write just name without pass and email , it shows on my screen error encaught ... about lenght of table in reallity i insered 1 but his lenght 3 . ..
13th Jun 2018, 5:35 PM
Ahlam
Ahlam - avatar
+ 1
sorry I have 0 knowledge in PDO
13th Jun 2018, 5:37 PM
Sudarshan Rai
Sudarshan Rai - avatar