Remember14a@xxxxxxx wrote:
Dear Friends,
Data in the table is displayed by php query.
.Say column A, in which name of company will be stored.
Now i want to add another column B to table in which web addresse will be
stored against each name in Column B.and same should be displayed in an html
table, when seen in browser with link to each web address in table.
The php query I am using now, is posted below.
What additional code should I add so that data in column A in table1 is
displayed in tabular form, with a link "on click", to web address in column B.
Guidance to further Query, please.
------------------------
Present Query
--------------------
<?php
// open the connection
$conn = mysql_connect("localhost", "", "");
// pick the database to use
mysql_select_db("b",$conn);
// create the SQL statement
$sql = "SELECT * FROM subscribers ORDER BY email";
// execute the SQL statement
$result = mysql_query($sql, $conn) or die(mysql_error());
//go through each row in the result set and display data
while ($newArray = mysql_fetch_array($result)) {
// give a name to the fields
$id = $newArray['id'];
$email = $newArray['email'];
//echo the results onscreen between ""can also //type$id is and &email is
echo " $email <br>";
}
?><center>
http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html
D
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php