Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End (BASIC) Problem following tutorial regarding PHP Post management system

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #147050
    Anonymous
    Inactive

    Hi!
    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 followed

    View my Pastebin where I also described the problem further.

    Thanks
    //Will

    #147098
    Anonymous
    Inactive

    Thanks! 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”.

    #147168
    Anonymous
    Inactive

    Yes 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 LONGTEXT

    #147271
    Anonymous
    Inactive

    CREATE 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=latin1

    #147300
    Anonymous
    Inactive

    Thank 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!

    #147324
    Anonymous
    Inactive

    Ok, got it working now, thanks! :)
    Datetime it is!
    Once again, thank you!

    #147963
    Anonymous
    Inactive

    I had used a single = instead of two in a conditional tag.. :P

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Back End’ is closed to new topics and replies.