![]() |
Why isnt this CREATE page working?
I'm trying to put together a simple domain managament database.
Its telling me that something went wrong when I try to add a new domain name record, yet it isnt highlighting any form fields with an error: Quote:
Everything in the config.php is 100% correct. Can anyone see where the error above is and, if so, could you point me in the right direction to fixing it? :helpme |
Can't help you, but I just remembered I'm out of bolognese.
|
Quote:
2. In the same statement you only list 7 parameters but in the bind you list 8 vars: (?, ?, ?, ?, ?, ?, ?) $param_Registrar, $param_DomainName, $param_Registration, $param_Expiration, $param_NameServer1, $param_NameServer2, $param_Status, $param_Notes I did not look any further than that. . |
Quote:
Sorry I've been up 38 hours working so missing the basics, must be time to call it a night. Thank you again for the help! |
Sorry, one more question.
Do I need to add a bind param for the 'ID' column too in the SQL DB? Or becajse its set to auto increment will that be added to the table anyway? :sleep |
Quote:
. |
Meh :/
Now i'm having an issue with it not writing to the database, any suggestions on where the issue may lay?
It's not throwing any errors and appears to be working how it is supposed to, it's just not storing the data in SQL :( Quote:
|
If it's a simple insert query why do you have to use mysqli_prepare, mysqli_stmt_bind_param, mysqli_stmt_execute etc? I prefer using mysqli_query when inserting simple data to db..
|
Quote:
This is just my test project, the ultimate use for this will be to allow multiple employees to add data to a larger database that controls a multitude of content based websites from a central admin management system. |
Quote:
|
It looks to me like you have your ifs screwed up:
You have: Quote:
Using what you have you would need something more like: if($stmt = mysqli_prepare($link, $sql)) { // Bind variables to the prepared statement as parameters // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)) { // Close statement mysqli_stmt_close($stmt); // Records created successfully. Redirect to landing page header("location: index.php"); exit(); } else { echo 'insert failed....'; } } else { echo "prepare failed"; } I don't know that that is the only issue. . |
All times are GMT -7. The time now is 09:13 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123