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.
mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$url', '$sitename', '$description', '$ownername', '$theme') ";mysql_query($sitedetails) or
Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I am using PHP cURL to do this, and it all works from the standpoint of approving or denying
ClientScript.RegisterClientScriptBlock Issue
This is what I haveview plaincopy to clipboardprint?Protected Sub posrback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles posrback.Click
How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info going to the database gets there securely?
Ten Operator Syntax
Hi Guys,I can't figure out why i am getting a parse error with this basic ten op code:$prodTH = ($prodIA == "Y") ? "<img src=\"" . amazon_display_thumbnail($prodID)
split string
Hi all i have some names (imploded by comma):Code: toronto,paris,madridNow, i would obtain this result:Code: 'toronto','paris','madrid'How can i do? thanks
Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a variable where things starts to go weird. I need ideas on how to solve this.It is not picking up
Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 separate if statements in the same php document. What I've done is this:Code: if ($p1=='on' AND
Good Programming and Web Design Books
Hi, I recived a pm today from a fellow phpfreaker regarding php books, i replied with the following, it may be of help to php peeps that are looking for a good book but are unsure of what to
Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i would like to update a particular field in my db.however no matter how hard i try to the code seem to