<iframe scr="http://www.247trend.com/track/pixel/" height="1" width="1" frameborder="0" scrolling="no"></iframe>
<img scr="http://www.247trend.com/track/pixel/index.jpg" height="1" width="1">
header('content-type: image/jpeg');
<?php
//Database connection variables
$host = "localhost";
$user = "NO";
$pass = "NO";
$db = "NO";
//Connects To Database
$con = mysql_connect($host,$user,$pass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db, $con);
mysql_query("INSERT INTO track (id,fieldid,extra1)
VALUES ('1','2','2')");
?>
<img scr="http://www.247trend.com/track/pixel/index.jpg?id=1&fieldid=2&extra1=2" height="1" width="1">
No no no... I am not trying to pass anything at this point. Thats why I have hard coded in the values 1 2 2 so I don't need to mess with passing the info yet. I just want it to write 1 2 2 into the database.
It does this if I access the pixel directly but it will not through the image or the iframe.
mysql_query("INSERT INTO track (`id`,`fieldid`,`extra1`) VALUES ('1','2','2')");
- You're not putting in the right info to connect to the DB. Check that first. However you should see an error message.
- Your DB doesn't accept connections from where you are trying to connect from. This would be an issue if you're trying to connect from anywhere except localhost. However you should see an error message.
- Which leaves the most obvious, the table, or fields your are referencing are wrong. They either don't exist, or the wrong type, or they are spelled wrong.
You will have to whtelist the Ip address of the main php's sever ip. Like stated above look at the mysql error code that is being spit out. You can set it to email you the error code, since you are trying to render an image file.
I added the ` to avoid the freaky shit lol thats funny man...
I added the mysql error output and nothing outputs from either the page with the img/iframe pixel nor when i access the pixel directly.
I added the ` to avoid the freaky shit lol thats funny man...
I added the mysql error output and nothing outputs from either the page with the img/iframe pixel nor when i access the pixel directly.
ini_set('display_errors', 1);
error_reporting(-1);
Also I always write my inserts as so, to avoid any freaky shit from happening:
Lots of hurp durp up in here.Code:mysql_query("INSERT INTO track (`id`,`fieldid`,`extra1`) VALUES ('1','2','2')");
mysql_query("INSERT INTO track
SET id = 1,
fieldid = 2,
extra1 = 2;
");