Jump to content

need PHP/MySQL help


forGood

Recommended Posts

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. :P

 

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.

 

 

Problem:

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.

Link to comment
Share on other sites

You can call call from the database (aslong as you define the information for the connection) and sort it ascending by movie name, then for your reservations use it to get the ID and bring that up
and you can have it so you call up the movie title from the movies table with a form that is filled out partially by the movies table then submits to reservations table
so to reservations you could go by <a hre=reservations.php="<?php echo $rows['id'] ?> Reservations </a>

then on reservations.php
$_GET['id']
Select from your tables and insert into

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.