Go Back   CodingForums.com > Web Projects and Services Marketplace > Web Projects > Project collaboration/ partnership

Notices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-21-2007, 04:48 PM   PM User | #1
rafal1000
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
rafal1000 is an unknown quantity at this point
Database/website coding help needed :)

Hey, all, first post here...

I have to do a web design project, and I'm not really sure how to approach it.... i already started to see how it would work.

http://bestcheapebooks.com/other/thomasproject/

all these question marks will be pictures of people (>500), i guess arranged in photoshop and sliced (that's what i did in this example). then, when i click any picture of a person, it has to pop up with a page showing a picture, the persons name, and some other info. (if you click any of the top left question marks you will see what i need).

so now my question is how to do this using databases (or anything more appropriate for the task)... because doing it all by hand by creating a new html popup and inputting the data by hand and then linking them all together would be tedious. does anyone have any good ideas on what code to use to make this work?

btw, if i posted this in the wrong forum, then tell me.

any help greatly appreciated
thanks a lot!
rafal1000 is offline   Reply With Quote
Old 09-21-2007, 05:10 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Well you could use a mysql database. Here is what I think you will need.

A place to upload the images.

During the upload process you would use a server side script to make thumbnails on the fly of the larger images.

When you upload the image, you will add the location of the larger image and the thumbnail into the database.

After doing this it will be a matter of retrieving the images and creating the html for them on the fly.

You won't need to make a new page for every image because you could do something like this
Code:
<a href="display.php?img=images/imagename.jpg" onclick="window.open(this.href,'photo','width=400,height=400');return false"><img src="images/tn_imagename.jpg" width="100" height="100" alt=""></a>
Of course this is all just the basics of what you will need. If you don't know php or mysql then good luck. Looks like you will be on a steep learning curve for a while.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 09-21-2007, 05:15 PM   PM User | #3
Daemonspyre
Regular Coder

 
Join Date: Mar 2007
Posts: 505
Thanks: 1
Thanked 19 Times in 19 Posts
Daemonspyre is on a distinguished road
Hi rafal -- and Welcome!

There are two questions that need to be answered before we can help you accomplish this task. They are not necessarily simple, but they are very important ones.

Which Server Side Language (PHP, ASP, .Net, JSP, Ruby, Ruby on Rails) do you plan on using?

What platform are you hosting this on? Linux or Windows (Apache or IIS)?

These questions, above all else in the beginning, is something you really need to consider. Each language has its pros and cons, and each can connect with and works well with MySQL. Each web server again has its pros and cons, and we can discuss those as well.

Again, welcome, and let us know what you have decided.
__________________
Quote:
To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
Please, if you found my post helpful, pay it forward. Go and help someone else today.
Daemonspyre is offline   Reply With Quote
Old 09-21-2007, 06:48 PM   PM User | #4
rafal1000
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
rafal1000 is an unknown quantity at this point
wow, really fast replies! thanks a lot

my hosting has linux and apache. as to the language, i'm not sure what i want to use - i guess you would recommend PHP for what i need to do, no? or maybe something better...

lots of thanks
i would really appreciate if anyone could help me anymore.
rafal1000 is offline   Reply With Quote
Old 09-21-2007, 08:42 PM   PM User | #5
Daemonspyre
Regular Coder

 
Join Date: Mar 2007
Posts: 505
Thanks: 1
Thanked 19 Times in 19 Posts
Daemonspyre is on a distinguished road
It looks as though you have just one system you can use, and that is LAMP (Linux, Apache, MySQL, and PHP).

That's your starting point. Read up on PHP and how it you can code in it, and that would be where to start.

You really need to read up on it before you start, or you will be making a mountain out of a mole-hill.
__________________
Quote:
To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
Please, if you found my post helpful, pay it forward. Go and help someone else today.
Daemonspyre is offline   Reply With Quote
Old 09-21-2007, 09:41 PM   PM User | #6
rafal1000
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
rafal1000 is an unknown quantity at this point
haha, a mountain out of a mole hill... nice, yeah i don't know a lot about php and mysql

btw, can i create the tables using MS Access and then upload it as mysql table?

i guess what i would need is have each of these pics to have a filename (such as pic1, pic2 etc) and then upon clicking, i would need it to open a template, contact a database, retrieve the name/other personal data/ info and put it into the template. am i thinking in the right direction? does anyone have any example code for the thing i need to do?

thanks a lot!!!
rafal1000 is offline   Reply With Quote
Old 09-22-2007, 08:27 AM   PM User | #7
rafal1000
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
rafal1000 is an unknown quantity at this point
ok

so i got a little bit of it to work. http://bestcheapebooks.com/other/thomasproject/1/

now when you click the very top left question mark it opens a box and has a name, class of, and quote things.

i put this php code into my document:



mysql_connect("localhost", "*********", "*******") or die(mysql_error());
mysql_select_db("******") or die(mysql_error());
$result = mysql_query("SELECT * FROM Table1")
or die(mysql_error());

$row = mysql_fetch_array( $result );
echo "Name: ".$row['stdname'].$newline;
echo "Class of: ".$row['stdclassof'].$newline;
echo "Quote: ".$row['stdquote'].$newline;




and this is how the table i made looks in phpmyadmin:




is this the right way to make a table? now my question is, how do i write php code to make it select for example the data from stdid 2, and not stdid1 (like it does always in the example code i put up)


so lets say i went it the idea that each time a user clicked an image, it would go to studentinfo.php?id=###. But now my question is, when i replace the ###, how do i write the code in php so that it it opens up studentinfo.php, and pulls the data from the correct stdid spot, and puts relevant name, class of, and quote texts?

i hope you understand what i mean

thanks for any help!

Last edited by rafal1000; 09-22-2007 at 05:27 PM..
rafal1000 is offline   Reply With Quote
Old 09-24-2007, 02:05 PM   PM User | #8
Daemonspyre
Regular Coder

 
Join Date: Mar 2007
Posts: 505
Thanks: 1
Thanked 19 Times in 19 Posts
Daemonspyre is on a distinguished road
Hi Rafal --

From what you showed us, your table structure looks OK, but as I cannot see the entire thing, I cannot comment on the entire table. As to your stdquote information, I would be really careful on putting student 'quotes' like your first record online. Very, very dangerous ground.

Now, to answer your second question -- how do I pull a specific record, you would use a WHERE statement in your query.

PHP Code:
$result mysql_query("SELECT * FROM Table1 WHERE id = '$REQUEST_[id]'"$db) or die(mysql_error()); 
Just remember to put in code that:

a) checks to see if you are looking for a specific ID. If not, then run the full table.

b) checks to make sure that you are looking for a numeric ID, so that SQL injection doesn't happen.

HTH!
__________________
Quote:
To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
Please, if you found my post helpful, pay it forward. Go and help someone else today.
Daemonspyre is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:51 PM.


Advertisement
Log in to turn off these ads.