- This topic is empty.
-
AuthorPosts
-
August 16, 2013 at 4:45 am #147050
Anonymous
InactiveHi!
When following a tutorial on building a basic PHP management system, everything worked out great. Then, when I tried adding 2 more variables to pass onto the table, I came across a problem.
The function doesn’t seem to find the $_POST[‘id’] to be valid.
View the tutorial I followedView my Pastebin where I also described the problem further.
Thanks
//WillAugust 16, 2013 at 9:02 am #147098Anonymous
InactiveThanks! I fixes the bind_param() to match the amount of data passed. I did not understand the bind_param function before, but now I do, ty :)
But I still get the same error.
On the page that submits the form there is no input with id, but that shouldn’t matter since the row gets an id in the table.
I have now tried:
– Recreating the database + table
– setting bind_param(“ssi”…. to “ssssi” aswell as “ss” to “ssss”.August 17, 2013 at 4:11 am #147168Anonymous
InactiveYes I did! :)
Don’t know if anyone has the time to try this themselves, but if anyone is willing they can download my EasyPHP folder with everything set up (windows) or just download the corresponding files.
The database structure looks like this: (connect located in connect.php AND process.php)
Database name: customcms
Table name: post
Cols: id INT AUTO_INCREMENT, title VARCHAR(50), date VARCHAR(50), author VARCHAR(50), content LONGTEXTAugust 18, 2013 at 10:48 am #147271Anonymous
InactiveCREATE TABLE
post
(
id
int(11) NOT NULL AUTO_INCREMENT,
title
varchar(50) NOT NULL,
date
varchar(50) NOT NULL,
author
varchar(50) NOT NULL,
content
longtext NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1August 18, 2013 at 5:34 pm #147300Anonymous
InactiveThank you SO much for helping me! Not only did you solve my problem, but you also helped me solve future problems by learning me a bit more of troubleshooting!! Thanks!
A quick question though;
date doesn’t seem to get stored, does that have anything to do with php already using date for something else? :)PS: I had NO idea that LONGTEXT was meant for SUPERMEGALONGTEXTs… 4gb is ALOT of text, hahah!
Once again, thank you so much!
August 19, 2013 at 2:09 am #147324Anonymous
InactiveOk, got it working now, thanks! :)
Datetime it is!
Once again, thank you!August 23, 2013 at 11:41 am #147963Anonymous
InactiveI had used a single = instead of two in a conditional tag.. :P
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.