Jump to content

kam1313

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kam1313's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the information. Being new to PHP I wasn't sure what to take out so I deleted the die part. Now the error is: Warning: Wrong parameter count for imagettfbbox() Thanks for your help.
  2. Hi, The code is as follows: var $font = 'times.ttf'; /* create textbox and add text */ $textbox = imagettfbbox($font_size, 0, $this, $font, $code) or die('Error in imagettfbbox function'); $x = ($width - $textbox[4])/2; $y = ($height - $textbox[5])/2; I'm still not sure where I'm going wrong as I have changed fonts aswell. Thanks for your help
  3. Hi, I'm getting this error with my captcha php page: Warning: Wrong parameter count for imagettfbbox() I'm using PHP version 5.0.5 and GD is enabled. Many thanks
  4. Hi, I have checked the tables and the columns in the temporary database are: - last name - first name - username - email - code (passcode) Thanks
  5. Hi We haven't used captcha yet. the passkey the automatic key generator for email confirmation. Cheers
  6. Hi, In the temporary database there is a field called 'code' and it takes this information and stores it as a variable called passkey. Thanks
  7. Thanks for the reply. Here's all the code: <?php //Confirm email $host = "************"; $username = "************; //connection to db $password = ********; $db_name = "*********"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $passkey=$_GET['Code']; $tbl_name = "Temp"; //SELECT * FROM $tbl_name WHERE Code = '$passkey'" $sql="SELECT * FROM $tbl_name WHERE Code = '$passkey'"; $result=mysql_query($sql); if($result){ $count=mysql_num_rows($result); if($count==1){ $rows=mysql_fetch_array($result); $LName=$rows['LName']; $FName=$rows['FName']; $UserName=$rows['UserName']; $Password=$rows['Password']; $Email=$rows['Email']; $Code=$rows['Code']; $tbl_name1="Dealers"; $sql1="INSERT INTO $tbl_name1(LName, FName, UserName, Password, Email, Code)VALUES('$LName', '$FName', '$UserName', '$Password', '$Email', '$Code')"; $result1=mysql_query($sql1); } else { echo "Wrong Confirmation code"; } if($result1){ echo "Your account has been activated"; $sql3="DELETE FROM $tbl_name WHERE Code ='$passkey'"; $result2=mysql_query($sql3); } } ?>
  8. Hi, Please could you help. I have a register.php login page where users register, the details are then logged into a temporary database, the user receives an email to verify their email address and then they complete the captha code and their details move to the permanent database. The problem I'm having is the email validation: //SELECT * FROM $tbl_name WHERE Code = '$passkey'" $sql="SELECT * FROM $tbl_name WHERE Code = '$passkey'"; $result=mysql_query($sql); if($result){ $count=mysql_num_rows($result); if($count==1){ $rows=mysql_fetch_array($result); $LName=$rows['LName']; $FName=$rows['FName']; $UserName=$rows['UserName']; $Password=$rows['Password']; The user receives the email and when they try to validate the information the message "wrong confirmation code" appears. Please help as I've checked this several times and its driving me nuts. Thanks
  9. Hi, please could you guys help me as I have created a register webpage where users create a login, I now need an automatic key generated emailed to the user for them to validate that they are the user who created the login account. I can't see to find any information and am new to php. Any guidance is much appreciated. Thanks
  10. kam1313

    Hi

    Hi I have posted a thread but need to edit it asap please please can someone help me Thanks
  11. Hi please help me. My cousin is studying but doesn't understand where he is going wrong. He has to "Create an XHTML form allowing dealers to create an account with the site. The form must require only basic contact details; chosen username, chosen password and email address. Account details are to be stored in your MySQL database. The system must prevent duplicate usernames being chosen. Do not use the email address as a username. Newly created accounts should remain inactive until they are verified by handshaking the email details" He code he has done so far is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Registration</title> <link rel="stylesheet" type="text/css" href="sitestyle.css" /> <!-- test.css - external style sheet --> <style type="text/css"> </style> </head> <body> <h1>Second Hand Records</h1> <hr /> <h2> Register form </h2> <p> Please enter your details here:</p> <form action="register.php" method="post"> <p>Surname:<br /> <input type="text" size="20" name="txtSurName" /></p> <p>First Name:<br /> <input type="text" size="20" maxlength="40" name="txtFirstName" /></p> <p>User Name:<br /> <input type="text" size="20" name="txtUserName" /></p> <p>Password:<br /> <input type="password" size="20" maxlength="8" name="txtPassword" /></p> <p>Email:<br /> <input type="text" size="20" name="txtEmail" /></p> <p><input type="submit" name="cmdSubmit" value="Submit" /> </p> </form> </body> </html> register.php <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ?> =\"1.0\" encoding=\"UTF-8\"?>\n"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml11.dtd" > <?php $host = "*****"; $username = "***"; //connection to db $password = "*****"; $db_name = "mdb_st622"; $tbl_name="Dealers"; //adapted from: http://www.techsupportforum.com/design-forum/web-design-programming/287560-solved-connecting-webpage-mysql-database.html mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $LName=$_POST['txtSurName']; $FName=$_POST['txtFirstName']; $UserName=$_POST['txtUserName']; $Password=$_POST['txtPassword']; $Email=$_POST['txtEmail']; $query = "SELECT * FROM $tbl_name WHERE 'UserName' = '$UserName'"; //Attempting to see if username already exists. Code does not work $result = mysql_query($query); if(mysql_affected_rows() > 0) { print 'name already in use'; } else { $sql="INSERT INTO $tbl_name(LName, FName, UserName, Password, Email)VALUES('$LName', '$FName', '$UserName', password('$Password'), '$Email')"; $result=mysql_query($sql); } $characters = "/^[^0-9][A-z0-9_]+([.][A-z0-9_]+)*[@][A-z0-9_]+([.][A-z0-9_]+)*[.][A-z]{2,4}$/"; if (preg_match($characters, $Email)) { echo "Email address is valid."; } else { echo "Email address is <u>not</u> valid."; } ?> <?php $create = "Account created"; //echo $create; echo '<a href="verifyaccount.html">Please click here to verify</a>'; ?> Any help is much appreciate as I don't understand this at all. Merry Christmas & Happy New Year thanks Kam
×
×
  • 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.