# Registration problem. php code suspected

**URL:** <https://forum.kirupa.com/t/registration-problem-php-code-suspected/173280>\
**Category:** Uncategorized\
**Created:** [December 22, 2005, 8:58pm UTC](https://forum.kirupa.com/t/registration-problem-php-code-suspected/173280 "2005-12-22T20:58:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blazes](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@blazes](https://forum.kirupa.com/u/blazes)\
**Post date:** [December 22, 2005, 8:58pm UTC](https://forum.kirupa.com/t/registration-problem-php-code-suspected/173280/1 "2005-12-22T20:58:32Z")

</div>

Hello everyone!🙂

I’m new to PHP and MySQL. I’ll tell you that now. I got a new website recently and am working on the registration. I have all of my code written. I used these tutorials.  
[http://www.tutorialized.com/tutorial/Advanced-PHP-MySQL-User-Membership-Script-Part-1/8776](http://www.tutorialized.com/tutorial/Advanced-PHP-MySQL-User-Membership-Script-Part-1/8776)  
[http://www.tutorialized.com/tutorial/Advanced-PHP-MySQL-User-Membership-Script-Part-2/8799](http://www.tutorialized.com/tutorial/Advanced-PHP-MySQL-User-Membership-Script-Part-2/8799)  
[http://www.tutorialized.com/tutorial/Advanced-PHP-MySQL-User-Membership-Script-Part-3/8876](http://www.tutorialized.com/tutorial/Advanced-PHP-MySQL-User-Membership-Script-Part-3/8876)

I tested it out to no avail. I tried to register and I get this error

> 

## The page cannot be displayed The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

Please try the following:

Contact the Web site administrator if you believe that this request should be allowed.  
Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.  
HTTP Error 405 - The HTTP verb used to access this page is not allowed.  
Internet Information Services (IIS)

* * *

## The page cannot be displayed The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

Please try the following:

Contact the Web site administrator if you believe that this request should be allowed.  
Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.  
HTTP Error 405 - The HTTP verb used to access this page is not allowed.  
Internet Information Services (IIS)

* * *

Here is my PHP code.

```php

<?php 
$server = "localhost"; 
$dbuser = "dbusername"; 
$dbpass = "dbpass"; 
$dbname = "dbname"; 
 
mysql_connect($server,$dbuser,$dbpass) or die ("Could not establish connection"); 
//isn't this where it connects? 
 
mysql_select_db($dbname); 
$user = $_REQUEST['username']; 
$pass = $_REQUEST['password']; 
$email = $_REQUEST['email']; 
$biography = $_REQUEST['biography']; 
$user=strip_tags($user); 
$pass=strip_tags($pass); 
$email=strip_tags($email);0 
$biography=strip_tags($biography); 
$user=str_replace(" ","",$user); 
$pass=str_replace(" ","",$pass); 
$email=str_replace(" ","",$email); 
$user=str_replace("%20","",$user); 
$pass=str_replace("%20","",$pass); 
$email=str_replace("%20","",$email); 
$user=addslashes($user); 
$pass=addslashes($pass); 
$email=addslashes($email); 
$biography=addslashes($biography); 
$minuser_len = 6; 
$minpass_len = 6; 
 
if(strlen($user) < $minuser_len || strlen($pass) < $minpass_len) 
{ 
die("User/password was not long enough!"); 
} 
$pass=md5($pass); 
$request = "INSERT INTO `users` ( `userid` , `username` , `password` , `email` , 
`biography`) 
VALUES ( 
'', '$user', '$pass', '$email', '$biography');"; 
$result = mysql_query($request); 
if($result){ 
echo "Registration was succesful"; 
} else { 
echo "Registration failed"; 
} 
?>

```

[color=#000000][color=#0000bb][/color][/color]  
[color=#000000][color=#0000bb][color=black]I can’t tell whats wrong![/color][/color][/color]
