Category : forms

I try to get a PHP array like this array( color => array("blue", "red", "yellow", "pink"), size => array("small", "medium, "large"), width => array("30", "32, "34"), ); The data is posted from a HTML form like below <form method="post" action="post.php"> <input type="text" name="data[color][]" value="red"/> <input type="text" name="data[color][]" value="blue"/> <input type="text" name="data[size][]" value="small"/> <input type="text" name="data[width][]" ..

Read more

I want to submit records in multiple tables via a form, using pdo. In the form there are fields of two tables. Using pdo, how do i send data to both tables in a single form? <?php $nome=$_POST[‘Text1’]; $cognome=$_POST[‘Text2’]; $dataNascita=$_POST[‘Text3’]; $materia=$_POST[‘Text4’]; $voto=$_POST[‘Text5’]; $dataProva=$_POST[‘Text6’]; $pdo = new PDO(‘mysql:host=localhost;dbname=classe;charset=utf8’, ‘root’, ”); $sql = "INSERT INTO studenti (nome, ..

Read more

im trying to practice my php and mysql skills and have a hudge problem, my goal is to create a form that sends the information into the database im stuck at different syntax errors and so on , this code create a Parse error: syntax error, unexpected double-quote mark in C:xampphtdocsinsert.php on line 35 and ..

Read more