I am desperately seeking some help with a program that was supposed to have
been completed last night. I have only been working with PHP for a week. I
have tried and tried and tried, but I am unable to get this program to work.
I posted a question earlier this week "Linking Query Results to a webpage",
however I could never figure out where to add the code and my client added
another complexity (open into a new window).
I have a very simple query that is writing out 4 variables from a 'mysql'
database. One of the variables is a 'url' (ie, www.pfo.biz,
www.corbanusa.com , etc.). I am trying to display the 'url' on a webpage and
let users click on the URL. When they click on the URL it NEEDS to open into
a new window.
I AM VERY BEHIND ON THIS PROJECT..and the little hair I had left I've
already pulled it out!
I am including my program below. The program is very simple and short. If
someone could please cut & paste the code directly into my program, so that
stupid me can't screw it up, I would really appreciate it. Again, I am sorry
for being so stupid this week Can somebody please help me!!!!!! Thanks!
BELOW IS MY CODE
<html><head><title>Get data</title></head>
<body>
<?php
$conn=@mysql_connect("localhost", "root", "")
or die("Err:Conn");
#select the specified database
$rs = @mysql_select_db("autoclub", $conn)
or die("Err:Db");
#create the query
$sql= "SELECT * from nc";
#execute the query
$rs=mysql_query($sql,$conn);
#write the data
while ( $row = mysql_fetch_array($rs) )
{
echo($row["name"]."<br>");
echo($row["address1"]."<br>");
echo($row["cszip"]."<br>");
echo($row["url"]."<br>");
}
?>
</body></html>