PHP/MySQL problem

Hello everyone,

I have a problem regarding PHP/MySQL.
I’ve been learning PHP, along with HTML/CSS/jQuery (jQuery just started), for a month now, without any prior programming/markup experience, so be soft here. :stuck_out_tongue:

Anyways, I’ve come across a problem I can’t solve and I’d be grateful if someone here can solve it for me. I have a leaning more towards the front-end development, so I kinda suck at PHP (haven’t really done anything in more than a week), but I would like to know the basics at least. Hope someone answers, thank you in advance.


Let’s say we have a database called ‘store’, a table called ‘movies’ and a table called ‘reservations’. I need to create a .php page with movie titles (let’s say the column is named ‘movienames’) sorted alphabetically, for example:

Almost Famous
American History X
Apocalipse Now

I should create a link on every title that leads to another page we can call ‘reservations.php’. There, we should list the schedule of reservations for a certain movie. Obviously, there should be a primary key (‘movienames’) from movies in ‘reservations’ as a secondary key. We should also have a date column, let’s call it ‘resDate’ and one more secondary key from another table (video store users for example) we can call ‘users’. We should format it like this:

Almost Famous
Monday, Marko
Saturday, Eric
Sunday, Ivan
That’s basically it, I should also have a link on ‘reservations.php’ that leads to the main page we can call ‘index.php’.

Thx again!

P.S. I’m sure it’s an easy task for you, but I’m really awful at PHP and I neglect it whenever I can.

Show us your code, so we can point you in the right direction, without your code, we’re not going to be of much help.

As already said by TopCoder, no can help you if you have no code.

Anyways I have created a small script for you, I hope you will find it useful. I’m also in the learning phase so accept it with whether you like it or not 8)

This script is very basic I haven’t done any insane validation on it, if you wana use it you have to do it yourself and there is only form i.e. for the customers’ reservation. I hope you will understand the logic and can add other features by yourself.

Download the ZIP file attached herewith and enjoy. ;D (4.11 KB)

That’s actually pretty basic, lots of tutorials on that kind of stuff. But to keep it on one page, i’d just use jquery with a few ajax calls. that way, you don’t have to keep bouncing the user around from page to page. Once you have some code to offer up, we’ll be happy to help you any way we can.

Thank you Richei for the Karma. Yeah it’s pretty basic but as I told earlier, I am still learning. Hope someday I will also have all the necessary web-development technologies under my belt. ;D

Sponsor our Newsletter | Privacy Policy | Terms of Service