[Guide]How to Program a Register Page (For MySql)

03/05/2011 07:41 stealarcher#16
Quote:
Originally Posted by Wikipedia
PHP: Hypertext Preprocessor (a recursive acronym, originally personal home page) is a general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as a standalone interpreter on most operating systems and computing platforms.
wait what did that say again?
03/05/2011 07:43 Arco.#17
Well fuck, I been beat.
03/05/2011 07:45 stealarcher#18
lol, it can also be used in some software as well, doesnt necessarily HAVE to be a website.
11/18/2011 01:05 BeatEmUp#19
hey, i think i went wrong somewhere: i got the php stuff in a file, and i got the html stuff at my site, but i still dont really have the php linked to my site. how can i do this?
11/19/2011 05:25 BioHazarxPaul#20
Quote:
Originally Posted by BeatEmUp View Post
hey, i think i went wrong somewhere: i got the php stuff in a file, and i got the html stuff at my site, but i still dont really have the php linked to my site. how can i do this?
what are u lost on?
PHP Code:
<form method="post" action=""> 

Username: <input type="text" name="username" value="" /><br/> 
Password: <input type="password" name="pass" value="" /><br/> 
Repeat Password: <input type="password" name="pass2" value=""/><br/> 
<input type="submit" name="submit" value="Submit" /> 

</form> 

<?php 
$conn 
mysql_connect("localhost""root""mysqlpass"); 
$db mysql_select_db("coproj"); 

if(isset(
$_POST['submit'])) 

     if(isset(
$_POST['pass']) && $_POST['pass'] != ""
     { 
          if(
$_POST['pass'] == $_POST['pass2']) 
          { 
               if(
strlen($_POST['pass']) > && strlen($_POST['pass']) < 32
               { 
                    
$sql "INSERT INTO `tablename` (Table1, Table2) VALUES ('".$_POST['username']."', '".$_POST['pass']."')"
                    
$sql mysql_query($sql); 
                    echo 
"Registered Successfully"
               } else { 
                    die(
"Your password must be between 3 and 32 characters."); 
               } 
          } else { 
               die(
"Your passwords do not match."); 
          } 
     } else { 
          die(
"Please enter in a password."); 
     } 

?>
Is everything you need to have then you just throw it into a .txt rename it to say reg.php then put it where you have ur apache installed.. being through xampp or Appserv.
11/20/2011 16:51 Eragon-sx#21
lol
12/03/2011 17:12 wheniwinyoulose#22
i need help when i open it it says what it says on the text document lol
12/05/2011 23:27 coreymills#23
Quote:
Originally Posted by wheniwinyoulose View Post
i need help when i open it it says what it says on the text document lol
make sure that the file extenstion is .php when u save the file

E.G: index.php
12/06/2011 00:56 12k#24
Also make sure that ur folder options isnt hiding extensions for known file types.
01/24/2012 15:09 rickgol#25
Hey Guys i'm getting this error : Warning: mysql_connect() [function.mysql-connect]: [2002] Uma tentativa de conexão falhou porque o componente conectado nã (trying to connect via tcp://localhost:3306) in C:\AppServ\www\index.php on line 11

Warning: mysql_connect() [function.mysql-connect]: Uma tentativa de conexão falhou porque o componente conectado não respondeu corretamente após um período de tempo ou a conexão estabelecida falhou porque o host conectado não respondeu. in C:\AppServ\www\index.php on line 11

Fatal error: Maximum execution time of 60 seconds exceeded in C:\AppServ\www\index.php on line 11

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

I need some help please :) thank you.
01/24/2012 16:01 12k#26
The information your using for mysql_connectis wrong. Most likely ur password.
01/25/2012 16:47 rickgol#27
Nope it's all correct look

[Only registered and activated users can see links. Click Here To Register...]

My Password and name is right but i'm getting this error ;/

[Only registered and activated users can see links. Click Here To Register...]
01/26/2012 03:15 BioHazarxPaul#28
id have to look at everything something isnt right, advice try to reinstall appserv, or use xampp, appserv is kinda crap..
01/26/2012 03:45 12k#29
Try using 127.0.0.1 instead of localhost. I dont speak the other language, so if u could translate that it would be great.