Hello, I grabbed this code from the web (dangerous to do). I connect, and can “add contact” but cannot “edit” or “remove.”
Any ideas will be appreciated.
lee
Add Contact
Name: | |
Phone: | |
Email: | |
'; } if ( $mode=="added") { mysql_query ("INSERT INTO address (name, phone, email) VALUES ('$name', '$phone', '$email')"); } if ( $mode=="edit") { Print '
Edit Contact
Name: | |
Phone: | |
Email: | |
Data Updated!
"; } if ( $mode=="remove") { mysql_query ("DELETE FROM address where id=$id"); Print "Entry has been removed
"; } $data = mysql_query("SELECT * FROM address ORDER BY name ASC") or die(mysql_error()); Print "Address Book
"; Print "Name | Phone | Admin | Add Contact | "; while($info = mysql_fetch_array( $data )) { Print "|
---|---|---|---|---|
".$info['name'] . " | "; Print "".$info['phone'] . " | "; Print "" .$info['email'] . " | "; Print "Edit | "; Print "Remove |