I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of mysql... went fine no problems.
Installed latest version of php... went fine no problems.
did all my configuring for the php.ini for mysql.
I am running php on windowsxp iis5.
When I access <?php phpinfo() ?> everything looks good I see mysql and mysqli settings. I can run php scripts no problem but when I try to run this:
<?
$dbuser = "blah"; <-changed for security
$dbserver = "localhost";
$dbpass = "blah*"; <-changed for security
$dbname = "leads";
//******** BEGIN LISTING THE CONTENTS OF salesreps*********
//CONNECTION STRING
mysql_connect($dbserver, $dbuser, $dbpass)
or die ("UNABLE TO CONNECT TO DATABASE");
mysql_select_db($dbname)
or die ("UNABLE TO SELECT DATABASE");
$sql = "SELECT * FROM salesreps";
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result)) {
do
{
$username=$myrow["username"];
$password=$myrow["password"];
$levelaccess=$myrow["levelaccess"];
$repidnumber=$myrow["repidnumber"];
echo "<option>$username</option>";
}
while ($myrow = mysql_fetch_array($result));
}
?>
I get a clear blank page in IE and if I view the source I see my phpcode.
In firefox is see this --> $username"; } while ($myrow = mysql_fetch_array($result)); } ?>
I connect find to my db using mysqladmin.
I am clueless. I moved my php.ini file into my c:windows dir from the c:php dir.
Any help is very much appreciated.
Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the script to show day.jpg from 6 AM to 6 PM, and to show night.jpg from 6 PM to 6 AM.I also need the
foreach iterator
Hi GuysDoes the foreach loop have an inbuilt iterator ?
my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statement which updates the database at the id's location the below code works up to the update statements
trim function issues
Hi guys, total noob here... So I've been tinkering around with a html and am using php to email the subitted data to me. It's all working fine, except now I've changed the rules of the form a little
PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,This is my first time on your website and please excuse if I am asking silly question.I have a question about PHP HTTP DIGEST AUTHENTICATION - published in PHP Manual - php.netTheir
help finding hacking loopholes
i was attacked by a redirect php injectionmy pc is clean of virusesso i figure that either my hosting server was hacked or that my php was hackedthe hack was an injection of some redirect
form variables from database help.
Hi all,I would like to have a form that gives you options based on the results of an mysql query.My example is this, say I have a mysql row with the colum name points and the result is 5. How would I
Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages into a alphanumeric value. I figured the hash function would be able to accomplish this; the results
Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now I am trying to decode it on the change password screen and having issues. Yes I am very new to this.
url- go to webpage
i have an input text field and submit button.how do i make the url entered into the textfield go to that webpage?