This works: $conn = mysql_connect('localhost', 'username1', 'password1') or die(mysql_error()); mysql_select_db('database1'); $sql = "INSERT INTO table1 VALUES (NULL,NOW(),value1,value2,value3);"; $result = mysql_query($sql, $conn) or die('Query failed: ' . mysql_error()); Code (markup): I want to add directly another query but if I add another $sql2 and $result2 it does not work: $sql2 = "SELECT * FROM table1"; $result2 = mysql_query($sql2, $conn) or die('Query failed: ' . mysql_error()); Code (markup): How do you go about adding two, three, four results?
I added the top to the bottom lines, uploaded and opened the website. All I got was an empty php screen. No 'SELECT'. I am not sure what you meant by: I was just wondering if there was any code that goes in between the first and second queries. Or maybe it is where the"Select" is printing out. Maybe it is not to print out on the php screen. But where?