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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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