SitePoint Sponsor |
|
User Tag List
Results 1 to 9 of 9
Thread: Data Not Selecting?
-
May 14, 2003, 17:23 #1
MySQL Data Not Selecting?
PHP Code:<?php
include("accesscontrol.php" );
include("common.php" );
include("db.php" );
dbConnect("star-craftx_com" );
$sql = "SELECT FROM design_users WHERE
username='$username' AND password='$password' AND aim='$aim' AND email='$email' date_joined='$date_joined'";
$date_joined = date("M d, Y h:i A", "$date_joined" );
echo "Welcome<b> $username</b>.<br>";
echo "You registered on:<b> $date_joined </b><br>";
echo "<b>Contact Info:</b><blockquote><br>";
echo "<b>AIM:</b> $aim <br>";
echo "<b>ICQ:</b> $icq <br>";
echo "<a href="mailto:$email">Email <b> $username </b></blockquote>";
?>Welcome koomann.
You registered on: Dec 31, 1969 06:00 PM
Contact Info:
AIM:
ICQ:
Email koomann
I don't know what I'm going wrong...
(NOTE: the reason why the $username still shows up, is because of "accesscontrol.php", the included file at the top).
Last edited by koomann; May 14, 2003 at 17:51.
-
May 14, 2003, 18:21 #2
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm afraid I don't see the problem. Could you point out just what is not working?
John
-
May 14, 2003, 18:24 #3
It dosen't pring out the information: $icq, $aim, $email ect. ect.
www.star-craftx.com/practice/xdesigns/bob.php
login is: koomann/blah
The date is also out of wack... >=\
-
May 14, 2003, 19:16 #4
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I would bet that for some reason these variables are not being assigned a value.
You will have to dig into those includes to find out where they were supposed to be assigned.John
-
May 14, 2003, 19:29 #5
But the includes don't assign any variables, except for "accesscontrol.php", which carries over the $username
db.php - dbConnect function...
common.php - hold an error function for when a part of a form isn't filled out, it'll prompt up a small message box, then bring them back to the form.
-
May 14, 2003, 19:39 #6
- Join Date
- Sep 2002
- Location
- Los Angeles
- Posts
- 1,709
- Mentioned
- 5 Post(s)
- Tagged
- 0 Thread(s)
I don't understand then, where are the $aim and $icq variables supposed to be coming from? There is no source for them.
Maybe I'm just being ignorant.TAKE A WALK OUTSIDE YOUR MIND.
-
May 14, 2003, 19:41 #7
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Exactly. Just where are these variables being assigned?
John
-
May 14, 2003, 22:48 #8
Doesn't this do it?
PHP Code:$sql = "SELECT * FROM design_users WHERE
date_joined='$date_joined' AND icq='$icq' AND aim='$aim' AND email='$email'";
-
May 14, 2003, 22:57 #9
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by koomann
What you want to do is to retrieve that information FROM the database.PHP Code:$result = mysql_query( "SELECT * FROM design_users WHERE user_name = '$user_name'" );
$resultArray = mysql_fetch_array( $result );
$date_joined = $resultArray['date_joined'];
$icq = $resultArray['icq'];
$aim = $resultArray['aim'];
John
Bookmarks