Web Register

09/02/2010 03:07 -Elliot-#1
If anyone here is willing to help me out plz

i am trying to set a Web Register for my PS

But i get this error

Parse error: syntax error, unexpected T_DNUMBER, expecting ']' in /home/a9867997/public_html/processor.php on line 3
09/02/2010 03:16 abrasive#2
What's on line 3 of your processor.php?
09/03/2010 00:28 AriezOMG#3
ur database username/pw/ip set? i dont believe it is.
09/03/2010 13:09 -Elliot-#4
<?php

$ip = $_SERVER['69.1.0.2.85'];
$login = trim($_POST['Shaiya']);
$pass = trim($_POST['Shaiya123']);
$repass = trim($_POST['Shaiya123']);
09/03/2010 17:10 abrasive#5
Quote:
Originally Posted by -Elliot- View Post
<?php

$ip = $_SERVER['69.1.0.2.85'];
$login = trim($_POST['Shaiya']);
$pass = trim($_POST['Shaiya123']);
$repass = trim($_POST['Shaiya123']);
I don't see any syntax errors in that, but for your $ip variable I think you just want:
Code:
$ip = '69.1.0.2.85'
There's no index in the $_SERVER array named '69.1.0.2.85'.

Are you still getting the error you mentioned in the first post?
09/03/2010 18:02 ProfNerwosol#6
Quote:
Originally Posted by -Elliot- View Post
<?php

$ip = $_SERVER['69.1.0.2.85'];
$login = trim($_POST['Shaiya']);
$pass = trim($_POST['Shaiya123']);
$repass = trim($_POST['Shaiya123']);
I don't remember login and pass text fields being called Shaiya or Shaiya123. Are you trying to insert default values in User and Pw fields this way? Skip the trim and $_POST then. By the way, read some about global variables and arrays in PHP if you want to tinker with it.
09/04/2010 05:38 -Elliot-#7
ProfNerwosol im using xampp now, but now i get a different error

Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\processor.php on line 20


mysql user = root
mysql password = kwda11kwda

phpmyadmin user = pma
mysql password = 4c8ad1b6b336eec


this is my informacion

and this is the line 20

$conn=mssql_connect("$dbhost","$dbuser","$dbpass") ;


Do i have to do this way i mean like this

$conn=mssql_connect("$Ramont","$root","$kwda11kwda
");
09/04/2010 05:50 abrasive#8
You need to install mssql support for php so the mssql_connect function exists first.

I would edit out those usernames and passwords if they are real.

You pass variables into the mssql_connect function, which you assign values to first. Like if your host is 192.168.1.44, and the root user's password is "p1zza$_", you would use it something like this:
Code:
$dbhost = "192.168.1.44";
$dbuser = "root";
$dbpass = "p1zza$_";
$conn = mssql_connect($dbhost,$dbuser,$dbpass);
There's no need for quotes around the variable names, only their values.
09/04/2010 09:06 -Elliot-#9
I keep geting error 20 on this line


$conn=mssql_connect("$dbhost","$dbuser","$dbpass") ;
Original

and this is was i edit

$conn=mssql_connect(127.0.0.1,pma,373166);

Still giving me a Error on line 20 can anyone help me solve this issue thanks
09/04/2010 09:16 ProfNerwosol#10
No, read about PHP and its functions. This is not a PHP selfhelp forum.
09/04/2010 10:08 abrasive#11
Quote:
Originally Posted by ProfNerwosol View Post
No, read about PHP and its functions. This is not a PHP selfhelp forum.
I agree, also not knowing what you are doing in this case is dangerous.
09/04/2010 16:03 -Elliot-#12
Quote:
Originally Posted by abrasive View Post
I agree, also not knowing what you are doing in this case is dangerous.
im not doing nothing dangerous i just want to know how can i resolve that error, what im doing wrong
09/04/2010 21:46 13latrix#13
Quote:
Originally Posted by -Elliot- View Post
ProfNerwosol im using xampp now, but now i get a different error

Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\processor.php on line 20


mysql user = root
mysql password = kwda11kwda

phpmyadmin user = pma
mysql password = 4c8ad1b6b336eec


this is my informacion

and this is the line 20

$conn=mssql_connect("$dbhost","$dbuser","$dbpass") ;


Do i have to do this way i mean like this

$conn=mssql_connect("$Ramont","$root","$kwda11kwda
");
Simple fix.
Change
$conn=mssql_connect("$dbhost","$dbuser","$dbpass") ;
To
$conn=mssql_connect('$dbhost','$dbuser','$dbpass') ;
or
$conn=mssql_connect('127.0.0.1','$dbuser','$dbpass ') ;
If your Xammp is running on local host with the DB.

Your welcome
Phish

Edit: Let me add.. I hope your webserv is secure as your releasing such sensative data is a major security risk.
09/05/2010 00:14 abrasive#14
Quote:
Originally Posted by 13latrix View Post
Simple fix.
Change
$conn=mssql_connect("$dbhost","$dbuser","$dbpass") ;
To
$conn=mssql_connect('$dbhost','$dbuser','$dbpass') ;
or
$conn=mssql_connect('127.0.0.1','$dbuser','$dbpass ') ;
If your Xammp is running on local host with the DB.

Your welcome
Phish

Edit: Let me add.. I hope your webserv is secure as your releasing such sensative data is a major security risk.
Why are you putting single quotes around the variables?

You are using the variable names as a string, and not actually passing the data contained within the variables to the mssql_connect function.
09/05/2010 06:51 13latrix#15
Dont question what works... he asked for a fix and its tested. I've sen his problem on several servers and this is the fix.

~Phish