Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $base = $_POST['base'];
- $nome = $_POST['nome'];
- $sql = "SELECT base FROM bases_table WHERE base = '$base'";
- ->> LINE 26 if(mysql_num_rows($sql) == 0) {
- // doesn't exist already, do stuff
- "INSERT INTO bases_table (base, nome) VALUES" . "('$base' , '$nome')";
- } else {
- // does exist, do something else
- }
- //*that part
- mysql_select_db('a2322671_spabr');
- $retval = mysql_query( $sql, $conn );
- if(! $retval )
- {
- die('Could not enter data: ' . mysql_error());
- }
- echo "Entered data successfully\n";
- mysql_close($conn);
- }
- else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement