Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
having a dumb problem with mysql_fetch_array and while loop
Old 04-09-2009, 02:12 PM having a dumb problem with mysql_fetch_array and while loop
Average Talker

Posts: 15
Name: taylor
Trades: 0
Im trying to display all my results, and then a form that allows the user to perform and different search query, this all works fine. the problem im having is with the while loop, all but one of my query results are displayed then my form is displayed then the last query result. how to i make it so all results are displayed then the form.

the sliver of main.php code were dealing with looks something like this.

while ($row_sql = (mysql_fetch_array($query))){

echo <table="asdf">;
echo $row_sql[blah blah blah];

}
?>
<html>
<form name="form1" method="post" action="main.php" target="iframe_****">
<label>
<input name="page" type="submit" class="myinputstyle" id="page" value="1">
<input name="page" type="submit" class="myinputstyle" id="page" value="2">
</html>
antioch1st is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-09-2009, 03:51 PM Re: having a dumb problem with mysql_fetch_array and while loop
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
I think you have some problems with you html syntax. <table="asdf"> is incorrect for one. Also you shouldn't be outputting html before the <html> tag.

Post the output of this script or link to the page itself.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 04-09-2009, 05:22 PM Re: having a dumb problem with mysql_fetch_array and while loop
Average Talker

Posts: 15
Name: taylor
Trades: 0
ha, sorry not to clear thats just jiberish as i didnt want to have to put uneccisary script in there. site is in the works. go to the link try searching "a" all youll see that the script outputs all the results then my html form then one last result??

http://www.slucency.com/
antioch1st is offline
Reply With Quote
View Public Profile
 
Old 04-10-2009, 12:08 PM Re: having a dumb problem with mysql_fetch_array and while loop
Average Talker

Posts: 15
Name: taylor
Trades: 0
hmm, dont know why but it stopped doing it after i messed around with the php table output.
antioch1st is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to having a dumb problem with mysql_fetch_array and while loop
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13758 seconds with 12 queries