quillspirit
-
Posts
33 -
Joined
-
Last visited
Never
Posts posted by quillspirit
-
-
How can I secure my db.php (I have it named something else) page so if somebody finds it, they can't just view source and see the database login information? Is there a way to easily encrypt it? I've heard of Zend, and know it is enabled on my server, but I have NO clue as to how to use it. Please give me some suggestions. Thanks!
-
Yep, you are asking about functions.
-
It is important that you don't have any kind of output before session_start(); - except for coments. A space between php open and session_start(); will killl you.
correct:
[code]
<?
session_start();
session_destroy();
?>[/code]
Incorrect:
[code]
<?
session_start();
session_destroy();
?>[/code] -
Have you checked that your form is actually posting employeenumber?
On that previous page, after the form is submitted, try something like this...
[code]if (isset($empcode))
{
echo "Employee: $empcode";
} else { echo "Null"; }[/code]
If it returns as Null, then your problem is in the form.
Also, when setting your session variable... session_register
[code]
session_register('empcode');
$_SESSION['empcode'] = $empcode;[/code] -
[quote author=ober link=topic=107125.msg429329#msg429329 date=1157559486]
I assume you set $_SESSION['empcode'] on another page?
$_SESSION['empcode'] = "blah";
That should be on a previous page. Also, make sure you're not using the "back" button in your browser to go back and reset the value.
You can also try print_r($_SESSION) to look at what is in the session array.
[/quote]
Thanks for that... I've been trying to figure out how to see what is in the session array. You gave me a parse error though... don't forget the blessed ; !!
print_r($_SESSION); -
Same question... what do you mean by different priorities? I have always used AND.
-
I need to pull up all [b]distinct[/b] userid_numbers out of [i]table1[/i] (To see who is online and in that location, excluding duplicate results), and then query [i]table2[/i] for each userid_number to get profile information, and then display in a table on the website.
So basically, I need to join these two queries...
[code]$query1 = "SELECT DISTINCT usernumber FROM table1 WHERE useronline_location='$location'";[/code]
to get the list of usernumbers (in an array?)... then run the following query in a loop, so it gets the information for each usernumber...
[code]$query2 = "SELECT * FROM table2 WHERE uidnum='$usernumber'";
// Display table here
[/code]
Can somebody assist? Thanks
Encrypting db.php page?
in PHP Coding Help
Posted