Jump to content

simonttz

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

simonttz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. What is the code? This is my register input fields code: <?php //Get the values Passed by the html form $fname = $_POST['fname'];$lname = $_POST['lname'];$email = $_POST['email'];$gender = $_POST['gender']; $uname = $_POST['uname'];$upass = $_POST['upass'];$about = $_POST['about'];$website = $_POST['website']; $mode = $_POST['mode']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- .style193 {font-family: Narkisim} --> </style> </head> <body> <?php if(!$mode){ //No mode was set we can assume they want to submit it, Lets show the form ?> <form id="form1" name="form1" method="post" action="register.php"> <p> <label for="fname">First Name:</label> <input type="text" name="fname" style="background-color:#808080" id="fname" /> Gender: <input type="checkbox" name="gender" id="gender" value="male" /> <label for="gender">Male</label> <input name="gender" type="checkbox" id="gender" value="female" /> <label for="gender">Female</label> </p> <p> <label for="lname">Last Name:</label> <input type="text" name="lname" style="background-color:#808080" id="lname" /> </p> <p> <label for="email">Email Addrr</label> <input name="email" type="text" id="email" style="background-color:#808080" size="25" maxlength="50" /> </p> <p> <label for="uname">Usernames:</label> <label for="uname"> </label> <input name="uname" type="text" id="uname" style="background-color:#808080" size="25" /> </p> <p> <label for="uname"></label> <label for="upass">Passwords:</label> <input name="upass" type="password" id="upass" style="background-color:#808080" /> </p> <p> <label for="label">Confirm Pa</label> <input name="upass2" type="password" id="label" style="background-color:#808080" /> </p> <p> <label for="uname"></label> <label for="upass"></label> <label for="website"><span class="style193">Personal Websites</span>:</label> <input name="website" type="text" id="website" style="background-color:#808080" /> </p> <p> <label for="upass"></label> <label for="website"></label> <label for="about">Tell us a bit about yourself:<br /> </label> <textarea name="about" cols="42" rows="4" id="about" style="background-color:#808080"></textarea> </p> <p> <label for="website"></label> <label for="about"></label> <label for="register"></label> <input type="submit" name="register" id="register" value="Register" /> <input type="button" name="Cancel" id="Cancel" value="Cancel" /> <input name="mode" type="hidden" id="mode" value="doreg" /> </p> <p> <label for="about"></label> <label for="register"></label> </p> <p> <label for="register"></label> </p> </form> <?php }elseif($mode=="doreg"){ //Ok they filled the form in lets process it. if($fname and $lname and $email and $gender and $uname and $upass and $website and $about){ //Check that all fields where filled (not best way of doing it) //Right we have all the fields filled and ready, now we can add them to the database if(mysql_query(%MYSQL QUERY HERE%)){ echo "Your registration was successful"; //Ok the query was done successfully show the registered message }else{ echo "We where unable to register you at this time, Please try again later"; //Oh Dear we couldnt enter the details into the database! echo "<br />".mysql_error(); } }else{ echo "You failed to supply all fields, Please go back and try again"; } }else{ //This should only happen if they try to access something which doesnt exist echo "Unexpected error occured"; } ?> </body> </html>
  2. Well how do you get it so that when you click register after all your data has been put in you receive an e-mail confirmation AND Activation? Also- How would I make a submit/cancel button be an image? which takes the user to a members only area ? codewise?
  3. See my thing is is that I want to paste the code ontop of a picture (input fields) and make the Submit / Cancel buttons the custom ones illustrated in the picture... not the generic ones html brings.
  4. Ok, so my business partner and I are making a website. He sends me an image and tells me to turn the exact image into a register script. I know some PHP codes such as tying the input fields into the sql database but I need to learn how to PHP code in a more advanced fashion. Of course I have google'd "Custom php register script" and other assemblies of keywords but I seem unable to get the results I desire.. I want specifically to learn how to make different functions such as male/female features that come with the Members Area. If anyone out there can give me some insight on how to do so it would be very helpful I have viewed Tutorials like this : But I want to know how to add features like 'choose your own password' & Gender features Here is the Image My partner sent me: http://i50.tinypic.com/30kr4zo.jpg [attachment deleted by admin]
  5. I get this Error Message: Parse error: syntax error, unexpected ':' in D:\Hosting\5397892\html\connectionfile.php on line 5 I created the connectionfile.php file in dreamweaver, saved it to my desktop, transferred it to my server from my local system with Fireftp, and it gave me this message. It may be because I did not set user privileges for the user I stated in the PHP file's code (connectionfile.php) Or because I did not put the connectionfile.php into the public_html folder in my server which I do not have.. I just created a directory called public_html and It still did not work... I am using Godaddy's PHPMYADMIN which for some reason is called starfield technologies.. I called them earlier and they said they cannot help me with phpmyadmin.. The code I used is as follows: <?php //opens connection to mysql server $dbc = mysql_connect('thankyouanime4','username','password'); if (!$dbc) { die('Not connected' : . mysql_error()); } //Select database $db_selected = mysql_select_db("thankyouanime4", $dbc); if (!$db_selected) { die ("can't connect :" . mysql_error()); } //test $query="UPDATE logininfo SET email='hopethisworks' WHERE username='username'"; $result=mysql_query($query); ?> I just want to run it from localhost so i can test it out and see what it does... Idk if this has something to do with it but check this out: on this tutorial it shows his server is running from LOCALHOST... on every other tutorial on the web it says the same thing. on MY phpmyadmin home page dashboard thing it shows the IP address to Godaddy HQ in Scottdale AZ. here is the video tutorial I was working from: Freeze frame at 0:30 and analyze: http://www.youtube.com/watch?v=ylKfl...D94BE42620925B This is what my screen looks like on the homepage: http://i47.tinypic.com/14dnho9.jpg If you can give me some advice or suggestions that would be great. Thank you Simon Heit
×
×
  • 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.