Jump to content

[SOLVED] Hey Guys, Call to undefined function: array() Prob .....


pznmynd

Recommended Posts

Greetings Guys,

 

New to php and having a little problem with a script im working on, i recieve the error,

Fatal error: Call to undefined function: array() in /usr/home/web/users/a0028977/html/const/temp/login.php on line 7

 

Originally i thought it was a synax error but after a few hours of checking and debugging i cant find the problem....

Thanks in advance for your assistance and nice community you have here,

Here is the start of my code, and the reference to Line 7.

 

FULL CODE:

<?php
require_once("connect.php"); //database connection

session_start();

// catch feild data varabiles
$userid			=	$_POST('userid');
$password       =   $_POST('password');
$submitted		=	$_POST('submitted');

if ($userid && $password){
////////////////////////////////////////////////
$query		= sprintf("SELECT  * FROM users where user_name = '$userid' and user_password = '$password'");
$result		= @mysql_query($query);
$rowAccount = @mysql_fetch_array($result);
///////////////////////////////////////////////
}
if ($rowAccount){

$_SESSION['id'] = $rowAccount['user_id'];

header("location: welcome.php");
exit;
}
elseif ($submitted){
.
.
.
.
.

 

Because i am calling connect.php is line 7 realy line 5 of connect?

CODE CONNECT.PHP:

<?php

//////////////////////////////
$database		=	"****";
$username		=	"*****";
$password		=	"*****";	
/////////////////////////////

$link	=	@mysql_connect('localhost', $username, $password);
$db		=	mysql_select_db($database, $link);

?>

/scott

try

$userid			=	$_POST['userid'];
$password       =   $_POST['password'];
$submitted		=	$_POST['submitted'];

but that is not the error i would have thought would have come from that but could be it

that kind of syntax gives

Fatal error: Function name must be a string

when i tried

 

Scott.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.