[PHP] Page To Navigate To URLs In MySQL Database?
Posted: Mon Dec 12, 2011 11:49 am
OK. So need a page that navigates to all the links in a MySQL table one by one (In Popup, or anything). I already have a script to add the URL:
addurl.php:
and msgurl.php
What would the code for the autoviewer be? I'd like something like a page where it opens another page with already navigating to an URL, closes it and opens another page with the next URL. I know this is difficult
but i even know its possible. Is anyone able to help me?
addurl.php:
Code: Select all
<?
include("header.php")
?>
<form action="msgurl.php" method="post">
<table border="0">
<tr><td colspan=2 align="center"><h1>Add A New URL</h1></td></tr>
<tr><td>Username:</td><td>
<input type="text" name="username" maxlength="40">
</td></tr>
<tr><td>URL:</td><td>
<input type="text" name="url" maxlength="200">
<tr><td colspan="2" align="right">
<input type="submit" name="submit" value="Submit">
</td></tr>
</table>
</form>
Code: Select all
<?
$host="localhost";
$user="xxxxxxx";
$pass="xxxxxxx";
$database="xxxxxxx";
$username=$_POST['username'];
$url=$_POST['url'];
mysql_connect($host,$user,$pass);
mysql_select_db($database) or die("Database Not Found");
$query = "INSERT INTO url VALUES ('','$username','$url')";
mysql_query($query);
mysql_close();
echo "You have added the URL succesfully! Click <a href=members.php>here</a> to return to the members area."
?>