Hi I found this partial script on another forum and thought this would be useful for aff link management. I've tried adding this:
My sql connection does not work
9
Hi
I found this partial script on another forum and thought this would be useful for aff link management. I've tried adding this:
but it still does not connect. I've created the database, table, user, password and I know the info is
correct but for some reason it won't connect. Am I mission something?
Here is all of it:
I found this partial script on another forum and thought this would be useful for aff link management. I've tried adding this:
PHP Code:
mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
correct but for some reason it won't connect. Am I mission something?
Here is all of it:
PHP Code:
<?php
$id = $_GET['id'];
//validate id
if(!is_numeric($id)) :
?>
Invalid url id
<?php
else :
$query = "SELECT url FROM tableName WHERE id = '$id';";
$res = @mysql_query($query);
if(!$res) :
?>
An error has occured
<?php
else :
if($row = @mysql_fetch_array($res)) :
header('Location: ' . $row[0]);
else :
?>
URL could not be found
<?php
endif;
endif;
endif;
?> - Havenhood
- [1] reply
- Jeremy Morgan
- [1] reply
- xrvel
- dgently42
- raj23
- johnpitter Banned
- stma
- webpro4hire
Next Topics on Trending Feed
-
9