View Full Version : Which programming laguage to choose

07-03-2007, 12:39 PM

i was just looking at this website :


the bit i would like to know how to do is...

after you login it gives you an option to save a restraunt to "your page" its called "my menupages".... when you go to a restraunt it gives you an option to "add to My Menupages".... thats what i want to be able to do but i dont no how to and where to start..

i also realise that each page is .asp is that the only type you can do that in or can you also do it in php aswell?

Cheers for your help :)


07-03-2007, 03:16 PM
You can do it in any server side scripting language. The first step would be to learn the basics of one. My recommendation would be to use DJ's video tutorials to get a grasp on PHP 8)

07-03-2007, 09:25 PM
right ok,

ive gone through the login tutorial i i have also make a register page.

on that website there is a button that says "add menu to your page" or something like that.

i dont really know what happens when that button is clicked.. does the menu have an id then when u click on it that number is inserted to a field in the table then when u go to "your page" you display everything in that feild or somthing... wouldnt that mean you would have to have more than one table :s.. looool im confused...

07-04-2007, 10:44 AM
on that website there is a button that says "add menu to your page" or something like that.

dont know what this is???

where is it

07-04-2007, 10:46 AM

emm its here:


its a link called "add to my menupages" with a yellow cross next to it

07-04-2007, 10:51 AM
ok i see the button your on about

what do you want to know

remember i am not the author of that site so dont know how he has written it

07-04-2007, 02:08 PM
basically i want to have a page on my website for the person that is logged on... the page will contain data which the user wants to keep... examples include the one above and emmm on lovefilm when u log on you can see your own rental list.. i want to have a page where it shows the user information they have chose to keep like the example above how the user is able to keep restraunts they want....

Hope this makes sense looool :S

07-04-2007, 03:33 PM

best to create a different table depending on which choice they make. I would add some fields in the user table so when they login you can tell which choices they have made and then display the data

07-04-2007, 08:22 PM
ok im a bit confused. :( i have one table called shops... it has all the shops in my area and a users table, a table with all the users in it...

so, if i have all my shops displayed and there is an option to add that shop to the users personal page what would it do and how do i do it...

i originally thought i could do it so that when i click on the link that adds the shop to the person page, it could get that shops id and add the shops id to a feild in the users table... but then a problem arises...

the shop id will do nothing in the users table unless somehow i was able to display stuff from the shops table... soooo i guess what im trying to work out is if you can use two different tables in one page...

i hope this makes sense or maybe i am just on the completely wrong track... hmmmmmmm

07-05-2007, 12:53 AM
of course you can display more than one table on the page

07-05-2007, 03:55 PM
oko so here is one table example,

$query = sprintf("SELECT * FROM users where user_name='$userid' and user_password='$password'");
$result = @mysql_query($query);
$rowAccount = @mysql_fetch_array($result);

how do u get data from another table?

would you do

$query = sprintf("SELECT * FROM users and shops where user_name='$userid' and user_password='$password'");
$result = @mysql_query($query);
$rowAccount = @mysql_fetch_array($result);

07-06-2007, 09:34 AM
so your wanting to do a join on users and shops
do they have a relationship?

or are you just wantint to display both tables

07-06-2007, 09:38 AM
well i was thinking when the user click on "add shop to ur personal page" it would add thats shop id to the users table, then somehow on the personal page the php code would get the shop ids from the user table and then go into the shops table and display all of the shop ids that it has been given.... or is that just stupid?! :S

07-06-2007, 10:45 AM

just create a fav_shops field in the user table then when the user clicks on a shop just pass the id in an UPDATE and add the id to the new field.

before you add the shop id to the new field just do a check to see if there are any other id's in that field. If you find one thats been added earlier just grab it and assign to a var.

so it will be....[Pseudocode]....

/// first query the db and see if there are any fav shops in the user table
$results = Select * from user where myid = $_SESSION['myid'];
/// if you find any save them to a var...
if($results['fav_shop_id'] !=''){

$oldfav = $results['fav_shop_id']."|"; ///<< delimit by a pipe


$newfav = $oldfav.$_GET['favshop']; /// concatinate both vars together retaining old shop id's

/// perform update here
update users set favshops=$newfav where user_id = myid

your one field (fav_shops) will contain data like this as time goes on, building up a collection..


get this working and we will move onto extracting this value into data you can work with to display the shops

07-06-2007, 03:24 PM
ok ive had a shot at that, but i can figure out how to insert the shop id to the favshop feild in the users table :( also what type of feild should the favshop feild be?