Hi,
I do create normally a table into my database and wrote codes to save in. Curiously when I cliick to save datas its looks like datas have been saved. But when I see into my database nothing appear. My table still blank. Other thing very strange is when I delete its works. Just not for saving.
Please see my codes:
- $link=mysqli_connect("localhost:3307","root","");
- mysqli_select_db($link,"rhumanos");
- ?>
Untitled Document - action="" method="post">
Enter Name "text" name="name"> Enter City "text" name="city"> "2" align="center">"submit" name="submit1" value="insert"> - "submit" name="submit2" value="delete">
- if(isset($_POST["submit1"]))
- {
- mysqli_query($link,"insert into name_city values('$_POST[name]','$_POST[city]')");
- }
- if(isset($_POST["submit2"]))
- {
- mysqli_query($link,"delete from name_city where name='$_POST[name]'");
- }
- ?>
IsraelPosted May 10, 2021, 1:53 AM