Read the directions completely before beginning
Read the directions completely before beginning.
This program instantly posts guestbook submissions and lists them from most
recent postings. It also blocks two like submit names so each posting is
individualized.
All things you need to be aware of are in red.
To set up your MySQL Database you will need to consult your hosting service.
They have different protocols for setting it up.
If you know how to use sql.txt you
can set up your database by clicking SQL at the top
of the database page. Once the page loads, go down to "Or
Location of the textfile :" and click browse. Here you will upload
sql.txt and click Go.
Your Database table should set up. Check to see that the first field in
each row is all in lower case letters. If the table is set and checked
scroll down this page to the instructions on "config.php"
On some websites you may have to load manually. If so the
instructions are below.
Guestbook -MySQL Manual Table Instructions.
1. Once you open you Database, go down to "Create new
table on database..."
and type "gbook1" in the "name"
text box.
2. Then type "8" in the text box labeled "Fields"
and click on GO.
3. On the next page, Going across from the left type "id"
in the "Field" box.
4. Then in the "Type" select "INT"
5. In the box "Length/Values*", type "11"
6. Skip "Attributes" and in "Null"
box select "not null". Then go to
"Extra" and select "auto_
increment". and indicate the Index Radio
button.
7 Go to the next line.
8. In the "Field" box type "postdate"
9. In the "Type" box select "VARCHAR".
10. In the box "Length/Values*", type "100".
11. Skip "Attributes" and in "Null"
box select "null".
12. Go to the next line.
13. In the "Field" box type "name"
14. In the "Type" box select "VARCHAR".
15. In the box "Length/Values*", type "100".
16. Skip "Attributes" and in "Null"
box select "null".
17. Go to the next line.
18. In the "Field" box type "email"
19. In the "Type" box select "VARCHAR".
20. In the box "Length/Values*", type "150".
21. Skip "Attributes" and in "Null"
box select "null".
22. Go to the next line.
23. In the "Field" box type "private"
24. In the "Type" box select "VARCHAR".
25. In the box "Length/Values*", type "50".
26. Skip "Attributes" and in "Null"
box select "null".
27. Go to the next line.
28. In the "Field" box type "website"
29. In the "Type" box select "VARCHAR".
30. In the box "Length/Values*", type "100".
31. Skip "Attributes" and in "Null"
box select "null".
32. Go to the next line.
33. In the "Field" box type "comments"
34. In the "Type" box select "VARCHAR".
35. In the box "Length/Values*", type "200".
36. Skip "Attributes" and in "Null"
box select "null".
37. Go to the next line.
38. In the "Field" box type "feeling"
39. In the "Type" box select "VARCHAR".
40. In the box "Length/Values*", type "50".
41. Skip "Attributes" and in "Null"
box select "null".
42. Click Save.
-----------------------------------------------------------------
config.php set up instructions.
To set up your php script.
The above is how the webpage connects to the MySQL database. Depending on the
hosting company this part of the script could be different. Email the tech
support of your hosting company and ask "What is the connection string protocol
for the MySQL database?" But 9 out of 10 times this will work
1. Right-click "config.php" and go to "open
with..." and then "notepad".
2. Change $hostname="yourdatabasehost";
3. Change $username="yourusername";
4. Change $password="yourpassword";
5. Change $dbname="yourdatabasename";
Another connection string we have come across is...
$dbh=mysql_connect ("localhost", "username", "<PASSWORD
HERE>") or die ('I cannot connect to the database because: ' .
mysql_error());
mysql_select_db ("database name");
Save the script.
-------------------------------------------------------------------
Upload everything to your website. Upload images to you image file.
Wyszukiwarka
Podobne podstrony:
read firstRead FirstRead FirstRead Firstread firstRead FirstRead Firstread firstRead FirstRead FirstRead FirstRead Firstread firstREAD FIRSTREAD FIRSTwięcej podobnych podstron