Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
|
About the validation:
The check in your script will only work if you have register_globals on, which basically means that any data passed to the script in GET or POST form will be set as an actual variable and not only in the GET and POST arrays.
This doesn't mean that you should switch register_globals to on, though, because it's not advised to do so regarding security.
What you want to do is change the $isbn, $author, $title and $price to $_GET['isbn'], $_GET['author] etc. when you're using a form with action="get". If you're using a form with action="post" you should change them to $_POST['isbn'], $_POST['author'] etc..
About the query:
I think you're trying to insert something in the database, right?
Seeing that 'into db#########' and 'mysql_select_db("db#########");' look the same.
You should be inserting data into a table and not into the database as a whole, so you should change 'into db#########' to 'into tablename'.
Then it should work.
And I'm also wondering why you're using a persistent connection. I'm not familiar with those so you might have a reason for it, but I think you should stick with mysql_connect for now instead.
About your own MySQL:
If you're running XAMPP or any other program of that sort, you can probably connect to your localhost with the following:
host: localhost
user: root
pass: '' (being an empty string)
If you haven't touched the root account, that is.
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
|