Well, I’m a beginner at PHP and I wanted to make a page that will show dailymotion stuff due to the adress bar and it might have parts so it will also show the parts in the mysql database, this is what I came up with but when I uploaded it EVERYTHING was blank. Does anyone know what the problem is?
Here is the code:
[code]<?php
$urlcode = $_GET[‘url’];
$urlcode = urldecode($urlcode);
$urlname = $_GET[‘n’];
$urlname = urldecode($urlname);
$dbhost = ‘iwon’tshowyouthis’;
$dbname = ‘orthis’;
$dbusername = ‘orthis’;
$dbuserpass = ‘orthis’;
mysql_connect ($dbhost, $dbusername, $dbuserpass);
mysql_select_db($dbname) or die(‘Cannot select database’);
$result = mysql_query(“select * from $urlname order by id desc limit 5”);
?>
<?
while($r=mysql_fetch_array($result))
{
//getting each variable from the table
$name=$r["name"];
$code=$r["code"];
echo "".$name." ";
} ?>
|