View Single Post
Old 07-17-2002, 08:12 PM   #1 (permalink)
Geetazz
Registered User
 
Join Date: Jun 2002
Posts: 12
Geetazz is on a distinguished road
Send a message via AIM to Geetazz
Lightbulb A Couple PHP & MySQL Questions

The first question I have is what is wrong with this script. This is my first one so there may be a lot of problems.

PHP Code:
<?php
/*program: myaccount.php
Desc: Allows users to see and update there information.
*/
?>
<html><head></head><body>
<enter>My Account</enter><p> This is where you see and update your information. If you don't see a star next to information it means you can't change this. Here is your information.<p>
$dbhost="localhost";
$dbuser="username";
$dbpass="password";
$dbname="name";

function dbConnect($db="") {
    global $dbhost, $dbuser, $dbpass;
    
    $dbcnx = @mysql_connect($dbhost, $dbuser, $dbpass)
        or die("The site database appears to be down.");

    if ($db!="" and !@mysql_select_db($db))
        die("The site database is unavailable.");
    
    return $dbcnx;
}
<?php
$query
="SELECT username, kennel, dspoints, job, email FROM member echo " Your Username is $username<br>
*
Your kennel name is $kennel <br>
You have $dspoints <br>Your job is $job <br>*Your email is $email <p><p>
"Here you can change the information that has star<p>
<from action="
checkall.php method=
'past'>
<
table border="0" width="100%">
Kennel  Name <input type='text' name='kennel'
size='25' maxlength='25' value='$kennel'>
<
p>Email<input type'text' name='email'
size='25'=maxlength='25' value='$kennel'> <p>Email<input type='text' name='email' size='25' maxlength='25' value='$email'> { if (!ereg("^.+@.\\..+$",$email));
$result mysql_query($query)
or die (
"couldn't execute query.");
echo 
"member info has been updated<br>";
}
?>
-----------------------------------------------------------------------------------
The second problem I have is making my auction script. I will just go step by step on what is going to happen and what I need.

1. I am going to put the images that is up for auction in a table.

2 Below the table it is going to have the highest bid for the item and the time left to bid. If you click on the picture it takes you to a page with more infomation: like highest bidder, who put this up for auction, and a form to bid.

I would like to make it where if the time is up it say auction for this item is over. I would also like to make it so that the highest bidder for an item can not bid until someone bids higher than them. Also, I would like them to only be allowed to bid how many points they have, not higher. They have points when they join. (I call the points dspoints)

I don't need a script for all of this I just need to know how can I do this. I just need to know what functions, variables, or whatever I need.
-----------------------------------------------------------------------------------
My last problem is decreasing numbers. I want to have the number of items left on the site(like number of apples left). Then when someone clicks on a item and fills out a form the number of items will decrease.

I know it is a lot but I would greatly appreciate the help!
Geetazz is offline   Reply With Quote