Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-06-2006, 03:52 PM   #1 (permalink)
dlazic
Junior Member
 
Join Date: May 2006
Posts: 1
Default IE Issue with php

Hi I have the following code, I know its not perfect but I did it myself, which I am pretty proud of lolzz..

The problem is that it works fine in Firefox but in IE nothing shows up. Blank page? I need some expert help in narrowing down the problem.

My code is the following:

Code:
<?php include "login/login.php"; include "login/header.php"; include "db_connect.inc"; $id=$_GET['id']; $query=" SELECT * FROM clients_info WHERE id='$id'"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $id=mysql_result($result,$i,"id"); $client_name=mysql_result($result,$i,"client_name"); $start_date=mysql_result($result,$i,"start_date"); $end_date=mysql_result($result,$i,"end_date"); $gender=mysql_result($result,$i,"gender"); $home_number=mysql_result($result,$i,"home_number"); $mobil_number=mysql_result($result,$i,"mobil_number"); $email=mysql_result($result,$i,"email"); $website=mysql_result($result,$i,"website"); $country=mysql_result($result,$i,"country"); $state=mysql_result($result,$i,"state"); $city=mysql_result($result,$i,"city"); $escorts=mysql_result($result,$i,"escorts"); $visiting=mysql_result($result,$i,"visiting"); $masseuses=mysql_result($result,$i,"masseuses"); $dancers=mysql_result($result,$i,"dancers"); $fetish=mysql_result($result,$i,"fetish"); $extra_notes=mysql_result($result,$i,"extra_notes"); $top_description=mysql_result($result,$i,"top_description"); $bottom_description=mysql_result($result,$i,"bottom_description"); ++$i; } ?> <html> <head> <title>Bella V.1 | Edit client</title> <script language="javascript" type="text/javascript" src="datetimepicker.js"> </head> <body> </P> <center> <TABLE width="95%" border="0"> <TR> <TD width="100%"> <h><b>EDIT CLIENT:</b></h> <FORM action="update_engine.php" method="post"> <P> <fieldset> <LEGEND>General Client Info</LEGEND> ID# <INPUT type="text" name="id" size="5" value="<? echo $id ?>"> <LABEL for="name">Client name: </LABEL> <INPUT type="text" name="client_name" value="<? echo $client_name; ?>" size="30"> Gender: <select name="gender" value="<? echo $gender; ?>> <option value="male">Male</option> <option value="female">Female</option> <option value="company">Company</option> <option value="other">Other</option> </select> </fieldset> <fieldset> <LEGEND>Start and End date of client contract</LEGEND> Start Date: <input name="start_date" id="start_date" value="<? echo $start_date; ?>" type="text" size="15"><a href="javascript:NewCal('start_date','ddmmyyyy')"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a> - End Date: <input name="end_date" id="end_date" value="<? echo $end_date; ?>" type="text" size="15"><a href="javascript:NewCal('end_date','ddmmyyyy')"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a> </fieldset> </TD> </TR> <TABLE width="95%" border="0"> <TR> <TD> <fieldset> <LEGEND>Contact Information</LEGEND> <center> Home #: <input type="text" name="home_number" value="<? echo $home_number;?>"> Mobil #: <input type="text" name="mobil_number" value="<? echo $mobil_number;?>"></br> </center> <center> Email: <input type="text" name="email" value="<? echo $email; ?>"> Website: <input type="text" name="website" value="<? echo $website; ?>"> </center> </fieldset> <fieldset> <LEGEND>Demographics</LEGEND> <center> Country: <select name="country" value="<? echo $country; ?>"> <option value="USA">USA</option> <option value="EUROPE">EUROPE</option> <option value="CANADA">CANADA</option> </select> State: <select name="state" value="<? echo $state; ?>"> <option value="AL">AL</option> <option value="AK">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DE">DE</option> <option value="DC">DC</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="IA">IA</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="ME">ME</option> <option value="MD">MD</option> <option value="MA">MA</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MS">MS</option> <option value="MO">MO</option> <option value="MT">MT</option> <option value="NE">NE</option> <option value="NV">NV</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NY">NY</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VT">VT</option> <option value="VA">VA</option> <option value="WA">WA</option> <option value="WV">WV</option> <option value="WI">WI</option> <option value="WY">WY</option> </select> City: <select name="city" value="<? echo $city; ?>"> <option value="Washington DC">Washington DC</option> <option value="Miami">Miami</option> <option value="New York">New York</option> <option value="Chicago">Chicago</option> <option value="Cleveland">Cleveland</option> </select> </fieldset></BR> <fieldset> Escorts <?php if(isset($escorts)) { ?> <input name="escorts" type="checkbox" value="x" checked> <?PHP } else {?> <input name="escorts" type="checkbox" value="x"> <?PHP } ?> Visiting<?php if(isset($visiting)) { ?> <input name="visiting" type="checkbox" value="x" checked> <?PHP } else {?> <input name="visiting" type="checkbox" value="x"> <?PHP } ?> Masseuses <?php if(isset($masseuses)) { ?> <input name="masseuses" type="checkbox" value="x" checked> <?PHP } else { ?> <input name="masseuses" type="checkbox" value="x"> <?PHP } ?> Dancers<input type="checkbox" name="Dancers" value="<? echo $dancers; ?>"> Fetish<input type="checkbox" name="Fetish"> </fieldset> <fieldset> <LEGEND>Notes (only for staff use):</LEGEND> <TEXTAREA name="extra_notes" rows="10" cols="50"><? echo $extra_notes; ?></TEXTAREA> </TD> <TD width="50%"> <fieldset> <LEGEND>Top Description</LEGEND> <TEXTAREA name="top_description" rows="10" cols="50"><? echo $top_description; ?></TEXTAREA> </fieldset> <fieldset> <LEGEND>Bottom Description</LEGEND> <TEXTAREA name="bottom_description" rows="10" cols="50"><? echo $bottom_description; ?></TEXTAREA> </textarea> </fieldset> </TD> </TR> <TR> <TD> <P> <INPUT type="image" src="login/images/save_f2.png" alt="Save"> <button type="reset"><img src="login/images/cancel_f2.png" alt="Reset"></button> </P> </FORM> </TD> </TR> </TABLE> </center> </body> </html>
dlazic is offline   Reply With Quote
Sponsored Links
Old 05-06-2006, 04:44 PM   #2 (permalink)
etono
Moderator
 
Join Date: May 2006
Posts: 86
Default Re: IE Issue with php

I am not sure how it is working in FF, but it appears that your $num variable would be 0 because the actual function call is mysql_num_rows() and perhaps you made a type and made it mysql_numrows(). In this case you are only pulling up one record from the database, but when you are pulling up multiple records I would recommend the mysql_fetch_array() function. It is just a lot less typing. Here is how you would use it:
Code:
$sql = "SELECT * FROM clients"; $result = mysql_query($sql); while( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) { $id = $row['client_id']; $name = $row['client_name']; $phone = $row['client_phone']; }
I am not sure if it is good practice or not, but I have gotten in the habit of adding the table name to the fields because with the mysql_fetch_array fetching an associative array gets a bit confusing when you have the same field name in other tables that you are joining.
etono is offline   Reply With Quote
Old 05-17-2006, 07:29 AM   #3 (permalink)
Dion
Junior Member
 
Join Date: May 2006
Posts: 10
Default Re: IE Issue with php

I can see (if FF is displaying someting ^^) why IE isn't... you start the '<body>' with '</p>' while '</p>' is an ending :S
Dion is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:35 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums