The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
help getting sql results into html
Can someone explain the best way to get my sql results into html? Specifucaly a table.
I have the query working great, but now what? How do i get these results into my html doc? I am using the html "form" tag to submit data to a php script which searches the db and returns my data. It returns the data to a blank white page. Obvioulsly i would like a normal html page with an html table containing the results. How do i do this... Please explain... thanks, --jake |
#2
|
||||
|
||||
Whats youyr query and what exactly do you want to show with your resusts? Did you assign your query a varible?
|
#3
|
|||
|
|||
Here is my query, this is from the php that is called by the html form "action" parameter. So all the data should be in $result
Can i access $result from my html doc? Even if i could it takes me to the white blank page when "submit" is hit. Thanks.. --jake $result = mysql_query("SELECT * FROM condo_vendors WHERE city='$localcity'"); while($row = mysql_fetch_array($result)) { echo $row['biz_type']; echo $row['name']; echo $row['phone']; echo $row['website']; echo $row['username']; echo $row['comment']; echo $row['datevar']; echo "<br />"; } I kinda found the answer myself.... so i will post so maybe someone else will benefit... Basically php and html docs are one and the same. Name your html file *.php and then you can call php commands (sql queries) in an inline fashion at will. Just put your start and stop PHP tags around your PHP commands. The db access login,passwd,dbaname will not show, because the document will be rendered. So its safe to view source and your db password and info will not be shown. Hope that helps someone else... --jake |
#4
|
||||
|
||||
Are you sure that your query is producing rows ?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|