Jump to content

renatovieita

New Members
  • Posts

    1
  • Joined

  • Last visited

renatovieita's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello guys, this is my first post so sorry if I made any mistake I need select record from one table and move to another table But I get this message saying "Warning: mysqli_query() expects at least 2 parameters, 1 given in" I had that on line 158, but now i get on line 156 I start to do PHP and mysql few weeks ago, only respond i get from teacher is search and search. <?php if (isset($_POST['username'])) { $searchq = $_POST['username']; mysqli_query("SELECT * FROM login WHERE username='$searchq'")or die ("could not search"); while($row = mysqli_fetch_array($con, $query)) { $username = $row['username']; $password = $row['password']; $age = $row['age']; $phonenumber = $row['phonenumber']; $nationality = $row['nationality']; mysqli_query("INSERT INTO admin SET username ='$username', password='$password', age='$age', phonenumber='$phonenumber', nationality='$nationality'" ) ; echo"Data successfully inserted"; } } ?> When i search i see this type of code "$data = mysqli_query" add variable before mysqli What should I do, to make it work. And send record from one table to another. Thank you
×
×
  • 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.