| | Author | Message |
|---|
HungryWolf 
| #1 posted April 6, 2008 at 6:16pm (EST) edited April 6, 2008 at 6:17pm (EST) |
Alright, I have an idea for a website that I would love to get started on, and I think it could get big. The only thing is, I don't know much about PHP or MySQL.
The website that I want to make is going to be based on databases made by the community. As in, a user signs up for the site, maybe makes a profile, and then gives information.
For example, a user chooses option A, and then are given Yes or No. If they select Yes, then they can also select Good, but they don't have to. Then their selection, whether it's Yes, Yes/Good, or No, goes into a database where it gets added to the other Yes', Yes/Goods, or Nos. Then if that user, or anyone else on the site searches for option A, they can see how many people chose Yes, Yes/Good, or No.
If anyone needs a better explanation, I'll try to make it better...
I've been looking over this: http://dev.mysql.com/tech-resources/articles/ddws/...
and I'm really confused because I don't know if the PHP is working or not for my site.
For example, there is a section in that tutorial that says to put in some PHP code to have it tell you the date. That works. Then it tells you to put in some PHP code so you can click a link that has a name attached to it, and the page that it links to is supposed to relay that name. This doesn't work. I copied and did everything the tutorial told me to, to no avail. I know the source doesn't contain the PHP I used, but maybe if someone could tell me a possibility of why this is happened, that would be great.
I'm sure there will be a lot more I will need help on, so I'd really appreciate if someone could just check this thread and help me out if you could.
Thanks in advance. | james2006 
| #2 posted April 7, 2008 at 8:33am (EST) edited April 7, 2008 at 8:39am (EST) |
pm me your email address and I'll send you my college website code
plus it would be a good idea to use a program called wamp (v5.5) is the
latest I think. would help you out more, only a bit busy with my college
work. Have a data compression project due in 11 days!
(Edit: now WampServer)
Sorry mate
James | james2006 
| | #3 posted April 7, 2008 at 9:02am (EST) |
I'll post here online too, so others might pick it apart
for you
James | HungryWolf 
| #4 posted April 7, 2008 at 9:27am (EST) edited April 7, 2008 at 10:11am (EST) |
Thanks James, appreciate it. I'm downloading WampServer right now, and I don't know if it's going to fix this problem I'm having, so I'm just going to put it just in case:
All the MySQL programs that I'm trying to use to connect to my MySQL database aren't working. The one tutorial site says:
"There are two ways you can access the MySQL server. The first is to use telnet to log into the host and use the MySQL client programs (mysql, mysqladmin, mysqldump, etc.) installed there to interact with the MySQL server directly. The second is to install those client programs on your own computer and have them connect to the MySQL server. Your Web host may support one or both of these methods, so you'll need to ask which."
As far as I know, GoDaddy doesn't allow connections from Telnet, and all those MySQL client programs are not working when I use them. Does anyone know how to set this up for GoDaddy, or should I just call them?
EDIT: Wamp is working just fine. I might need to know about this later on though. | John 

| #5 posted April 7, 2008 at 9:35am (EST) edited April 7, 2008 at 9:35am (EST) |
Have you set up the MySQL DB at GoDaddy?
- John...
 | John 

| | #6 posted April 7, 2008 at 9:36am (EST) |
Note that that would be unrelated to your second test not working though. I don't see that that has anything to do with a DB yet unless you are doing more behind the scenes than you are indicating here.
- John...
 | HungryWolf 
| #7 posted April 7, 2008 at 10:10am (EST) edited April 7, 2008 at 10:10am (EST) |
John, yes, I set one up, yet I still cannot connect to it.
About the second test, I realize that. Would it be a PHP problem? | james2006 
| #8 posted April 7, 2008 at 10:15am (EST) edited April 7, 2008 at 10:20am (EST) |
Start PHP code
<?php
End Php code
?>
Keep you going
(Not complete code and in a table! in a form!)
<form method="POST" action="password.php"> (Bold points to the page)
User name box <input type="text" name="userid">
Password name box <input type="password" name="password">
Submit button <input type="submit" name="go" value="Click to Continue">
The next page must have to display these
$userid=$_POST["userid"];
$password=$_POST["password"];
to display on a page use
<?php echo($LinkAddress); ?> (bold is your varable, in your webpage it would be name! for kevin)
Connecting to a db, through web page
$conn = mysql_connect("localhost", "root","") or die("Could not Connect");
$rs = mysql_select_db("zitaron_quads", $conn) or die("Couldn't Find Database");
MYSQL commands to select the username and password from a database,
not encrypted. if not there its a fail!
$sql="select * from password where ";
$sql.= "userid =\"$userid\" AND ";
$sql.= "password =\"$password\"; ";
more later
James
= Your code should be =
(on the "Welcome to our Web site, !" page)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
</head>
<body>
Welcome to our Web site, <?php echo($_GET["name"]); ?> !</body>
</html>
</object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'&... | HungryWolf 
| | #9 posted April 7, 2008 at 10:26am (EST) |
Thanks James. I'll try that later. I'm trying to go through the tutorial just so I can get a little information about how to use MySQL/PHP. | HungryWolf 
| | #10 posted April 7, 2008 at 11:50am (EST) |
That worked. I don't know why the tutorial's directions don't work...
<?php
echo( "Welcome to our Web site, $name!" );
?>
Is what it tells me to do. | ndrake 
 
| | #11 posted April 7, 2008 at 9:06pm (EST) |
http://shiflett.org/articles/sql-injection |
Topic Page Hits: 1 today (1 in the last 30 days) |