php_auto_file open/save/close when opening site on IE
Posted by: jj08 (62.150.157.---)
Date: May 08, 2008 10:25PM

all my sites when executed using IE the php_auto_file open/save/close dialog box appears..

Options: ReplyQuote
Re: php_auto_file open/save/close when opening site on IE
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 08, 2008 10:36PM

can i see some of script... send me the whole script of a page it happens on ,, its usually somehting simpele like the wrong content-type

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: php_auto_file open/save/close when opening site on IE
Posted by: jj08 (62.150.157.---)
Date: May 08, 2008 10:40PM

ok this is it. thanks for your time

<?php

require_once "config.php";

if (strlen(trim($strSessionPath)) > 0)
session_save_path($strSessionPath);

session_start();

$intUserNumber = 0;
$strName = "";
$strPassword = "";
$boolError = false;
$strTempDBInfo = "";

if (empty($HTTP_POST_VARS['name']))
{
$_SESSION['usernumber'] = 0;
$_SESSION['name'] = "";
$_SESSION['message'] = "No user name was specified.";
$boolError = true;
}
else
{
$strName = $HTTP_POST_VARS['name'];
$strPassword = $HTTP_POST_VARS['password'];
}

if (!$boolError)
{
$strTempDBInfo = DBTYPE."_pconnect";
$conn = $strTempDBInfo($DB_HOST,$DB_USER,$DB_PASS);
}

if (!$boolError && !$conn)
{
$_SESSION['usernumber'] = 0;
$_SESSION['name'] = "";
$strTempDBInfo = DBTYPE."_error";
$_SESSION['message'] = "Unable to connect to DB server: " . $strTempDBInfo($conn);
$boolError = true;
}

$strTempDBInfo = DBTYPE."_select_db";

if (!$boolError && (!$strTempDBInfo($DB_NAME)))
{
$_SESSION['usernumber'] = 0;
$_SESSION['name'] = "";
$strTempDBInfo = DBTYPE."_error";
$_SESSION['message'] = "Unable to select DB name: " . $strTempDBInfo($conn);
$boolError = true;
}

if (!$boolError)
{
$sql = "SELECT UserNumber, UserName FROM login " .
"WHERE UserName = '$strName' AND UserPassword = '$strPassword'";

$strTempDBInfo = DBTYPE."_query";
$result = $strTempDBInfo($sql);

if (!$result)
{
$_SESSION['usernumber'] = 0;
$_SESSION['name'] = "";
$strTempDBInfo = DBTYPE."_error";
$_SESSION['message'] = "Could not successfully run query ($sql) from DB: " . $strTempDBInfo($conn);
$boolError = true;
}
}

if (!$boolError)
{
$strTempDBInfo = DBTYPE."_num_rows";

if ($strTempDBInfo($result) == 0)
{
$_SESSION['usernumber'] = 0;
$_SESSION['name'] = "";
$_SESSION['message'] = "User not found.";
$boolError = true;
}
else
{
$strTempDBInfo = DBTYPE."_fetch_assoc";
$row = $strTempDBInfo($result);

$_SESSION['usernumber'] = $row['UserNumber'];
$_SESSION['name'] = $row['UserName'];

//Updte UserLastIP here
$strUserLastIP = $_SERVER['REMOTE_ADDR'];
$sql = "UPDATE login SET UserLastIP = '$strUserLastIP' " .
"WHERE UserName = '".$row['UserName']."'";

$strTempDBInfo = DBTYPE."_query";
$result = $strTempDBInfo($sql);

if (!$result)
{
$strTempDBInfo = DBTYPE."_error";
$strMessage = "Could not successfully run query ($sql) from DB: " . $strTempDBInfo($conn);
$boolError = true;
}
else
{
$_SESSION['message'] = "";
$boolError = false;
}
}
}

if ($boolError)
{
header("Location: index.php"winking smiley;
}
else
{
header("Location: main.php"winking smiley;
}
?>

Options: ReplyQuote
Re: php_auto_file open/save/close when opening site on IE
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 08, 2008 10:46PM

ther is no downloadable prompts in this script?


are u acutally running the php script thru the server are are u just opening them?



u need to go to


http:// localhost/filename.php to run the file


put the files u want to run in c:/wamp/www


so for exampe c:/wamp/www/filename.php wud be run by opening browser and going to http:/ /localhost/filename.php

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.