Hello I am on page 148-149 and cant seem to get the page working at all. I have tried running it in IE and FF and still same result. I ahve checked the code several times and also copied the code from the pdf sample book and still no luck.
The page should come up with the list of jokes in the database and a delete button next to each joke.
Try deliberately giving the script the wrong password for the database. If the script is running then when given the wrong database password it should throw up the “unable to connect to the database error”.
I have used all my scripts I typed up on both my computers (Laptop & Desktop) and it works on my desktop but not on my laptop but all other scripts work on my laptop just this deletejoke one doesnt for some reason. Beats me.
Hi, I’m having exactly the same problem, and have gone through the same process as described above, and the “Delete Joke” code from the book just does not work. It causes the Apache server to get stuck and shut down, though every other script in the book has worked so far.
I’m worried about what this means in terms of getting a “real” project to work, because it seems as though the creation of the $jokes array is the problem, and if this is a necessary step that allows us to uniquely identify rows of data, then that seems like a pretty crucial function!
Is there any other way to achieve the same goal?
This workaround you used makes me think that maybe it’s a configuration setting, either in Apache or PHP? Something that has to do with how arrays or variables are handled, maybe? I’m such a beginner, I really have no idea. But if at all possible, I’d like to try to fix the problem, rather than try to run the programs from a memory stick (though I’ll do it, if that’s what it takes). It just makes me nervous, because I keep thinking, how’s it going to work on the actual production server?
Also, it’s hard to move forward in the book, because all subsequent codes build on the “faulty” code (or, at least the code that’s not working on my machine).