Hi, my funct is inside a funcionts.php file
Variables are declare at the top. All my pages have error code handling
Question how can I change to code to avoid the while loop?
<?php
//Start php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
// Global Variables
$ms_sql = array( "Database"=>"WEBSQL", "UID"=>"xxxx_user", "PWD"=>"xxx2003");
$sql_server = "INTRANET";
$local_ip = getenv("REMOTE_ADDR") ;
$local_user = gethostbyaddr($_SERVER['REMOTE_ADDR']);
.......
?>
Thank you All
Good Morning, (First post)
I have modified several functions. They no longer need 2 variables, just one.
But they still working fine when I send two variables. Why there is not error?
Function web_name($the_id)
{
$var_sql = "select page_name from web_pages where page_id='$the_id';";
$ms_conn = sqlsrv_connect($sql_server, $ms_sql);
$result = sqlsrv_query($ms_conn,$var_sql);
while ($row = sqlsrv_fetch_array($result)) {
return $row['page_name'];
}
sqlsrv_close($ms_conn);
}
Thank you All,
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.