Jump to content

A simple example of php/mysql webpage using dreamweaver

Recommended Posts

[color=brown][size=11pt]Hi..  :)

I really liked this forum.. it's all about PHP  8)

can anyone from the nice people write a simple webpage that includes a clickable map, random photographs browser and a small database with one query..

I need to understand the connection between all of these.. then discuss that with you people  :D

I need to see the code and the result page.. after that I can easily connect ideas in my mind  :-\

I have a good knowledge of HTML CSS .. .. .. etc..  ;)

but ! .. it's my first time to use the dynamic programing ( php with mysql )  ???

I usually use dreamweaver..  it's lovely ::)

I appreciate your kindness in helping me..


Link to comment
Share on other sites

Hey Sara,

There are tons of tutorials online to show you how to make a simple database website. All you need to know is how to connect to the database and output some text.

There are also lots of "random" tutorials and scripts out there as well as image manipulation.

try: http://www.wsworkshop.com/php/php-mysql-weblog.html or just typing in php mysql tutorials in google or something. If you are looking for some pre-made scripts there are some on this site and on www.hotscripts.com sometimes it's easier to learn when you have something in front of you that works.

you will also have to set up a testing server for dreamweaver if you haven't already here is a good site: http://apachemysqlphp.com/

hope this helped you out a little  ;D
Link to comment
Share on other sites

Thank you very much Chris.. That was helpful..  :D

I'll try my best.. and if I have any questions, I'll get back to this lovely forum..  ;D


if anyone have any more detials/information wants to add.. please do so..  :)


Thanks again,

Link to comment
Share on other sites

Thanks Chris.. I appreciate that..  :)

I hope you are not going to be tired from the huge number of questions.. lol  ;D just  8) kidding :D

Ooops :o, here is the first problem ! ..  :-[

assuming that I have no server.. no domain.. just trying to test the php files using dreamweaver..

what should I fill these empty boxes  ::) ! in the picture below.. !?  :-\


[attachment deleted by admin]
Link to comment
Share on other sites

First you should set up your computer so that it has a static ip address. once you have that you can type that ip address into the first text field. type "localhost" for the second, and your e-mail address into the last one...your e-mail address doesn't really matter too much if it just on your pc
Link to comment
Share on other sites

Hello Sara,
I am new to this also and have received wonderful help from this forum. If you look at my post (it is long), many of your qestions may be answered. Look at the, "Newbie - for real! Just getting started!" posting.

I just today got to the point where I can see my .php pages on my computer. Editing them is another story however, I am sure I will get help with that also.

Link to comment
Share on other sites

[quote author=cmgmyr link=topic=99676.msg393135#msg393135 date=1152285657]
Are you behind a router, or are you just directly connected to a modem?

[size=11pt][color=brown]hmmm  ::) it's Modem.. wireless !  :-X :)


Thanks Ummzee.. I'll look at your post, too.[/color][/size]
Link to comment
Share on other sites

If you want to test on your computer without having to be connected to the internet, you can install WAMP which will put PHP, Apache, MySQL, and PHPmyAdmin, and SQLite on your computer. Then, when you try to preview in browser your PHP code something will pop up and say "The page you are looking at contains server side code, would you like to select..." and then you say yes and fill out the form with the information.
Link to comment
Share on other sites

  • 2 weeks later...
Everything is fine..  ;D with connecting to the servers throw my computer..


but I got another problem !..

I have two files.. form.php  -  query.php

<form action="http://localhost/queries/query.php" method="post" name="form">

Searching for players which play these games...
<br />
<br />
<input name="football" type="checkbox" value="x">Football
<br />
<input name="basketball" type="checkbox" value="x">Basketball
<br />
<br />
<input name="reset" type="reset" value="Reset"/>
<input name="submit" type="submit" value="Submit"/>

$pageNo = $page +1;

$pageNo = $page;
echo "Page Number:&nbsp<b>$pageNo</b>";


//connecting to my database.. and for sure it's working..(hidden for now)

$football = $_POST['football'];
$basketball = $_POST['basketball'];

$preQuery="select * from Macrofossiles where (football = '$football') || (basketball= '$basketball')";
$preResult=mysql_query($preQuery,$server) or die("Could not execute preQuery...");

$query = "select * from Macrofossiles where (football = '$football') || (basketball= '$basketball') limit $page, 1";
$result = mysql_query($query,$server) or die("Could not execute query...");

while($row = mysql_fetch_array($result))
'<table bordercolor="#CC7722" align="center">' .
"<tr><td>Player Number:</td><td>{$row['Player_No']}</td></tr>" .
"<tr><td>Hockey:</td><td>{$row['Hockey']}</td></tr>" .
"<tr><td>Volleyball:</td><td>{$row['volleyball']}</td></tr>" .
"<tr><td>Tennis:</td><td>{$row['tennis']}</td></tr>" .
"<tr><td>Football:</td><td>{$row['football']}</td></tr>" .
       "<tr><td>Basketball:</td><td>{$row['Basketball']}</td></tr>" .
   echo "<b>Page:</b>&nbsp;&nbsp";
    echo "<a href='query.php?page=$num'>$font $num $unfont</a>&nbsp";
    $num = $num + 1;


|  Player_No  |  Hockey  |  Volleyball  |  Tennis  |  Football  |  basketball  |
|       1        |       x      |       x       |             |      x       |                 |
|       2        |              |       x       |      x      |              |        x        |
|       3        |       x      |               |      x      |      x       |                 |
|       4        |              |       x       |      x      |              |        x        |
|       5        |       x      |       x       |             |      x       |        x        |
|       6        |       x      |       x       |             |      x       |                 |
|       7        |              |       x       |      x      |              |        x        |
|       8        |       x      |               |      x      |      x       |                 |
|       9        |              |       x       |      x      |              |        x        |
. . . etc

I hope someone can help..

Oops.. I didn't tell you guys what is the problem I'm sufferring from in these codes..

here is it..

when I check the two checkboxes... and click submit..

the query.php open and everything seems okey.. the results are perfect.. and exact..

but !! .. when I click number 2 or 3 or any number after the first click, everything is changed !! ..

it geves me the result of this query
"select * from Macrofossiles where (football = '') || (basketball= '')"

I mean it gives me the result when football is empty and basketball is empty..

that means this query-->"select * from Macrofossiles" all the resutls will show up ..  :(

any help !  ::)  :D[/color]
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.

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.