Look at my code please...
Posted: Thu Mar 29, 2007 4:12 pm
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a code on that is a form to upload videos to my site in a database and something im doing is not allowing it to load, so can you look at this for me please.
The table is located under _videos --> upload --> and the "field" "title" is "upload" and the other field is "code", which is the code that I am trying to upload. Here is a screenshot...
http://morpia.com/php_problem.JPG
Page I am trying to put this on can be found here: http://morpia.com/site.php?page=uploadCode: Select all
<?php
$dbhost = 'localhost';
$dbuser = 'morpiaco_videos';
$dbpass = '*****';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'morpiaco_videos';
mysql_select_db($dbname);
$query = "SELECT title, code FROM upload WHERE code='$code'";
$result = mysql_query($query);
mysql_query("SELECT DATE_FORMAT(date, '%m/%d/%Y') as formatteddate");
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
?>
<? echo $row['code']; ?>
<?
}
mysql_close($conn);
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]