What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP/MySQL help

PHP/MySQL help
Author: Message:
lordy
Senior Member
****


Posts: 853
Reputation: 24
35 / Male / Flag
Joined: Jul 2004
Status: Away
O.P. RE: PHP/MySQL help
well, so far i have this:

code:
<html>

<body>

<?php
$db = mysql_connect("127.0.0.1", "root");
mysql_select_db("movie_library",$db);
$_POST = array_map("mysql_escape_string",$_POST);


if (isset($_POST['dvd_title']))
{
//Form has been submitted
$dvd_title = $_POST['dvd_title'];
$dvd_director = $_POST['dvd_director'];
$dvd_classification = $_POST['dvd_classification'];
$dvd_actors = $_POST['dvd_actors'];
$dvd_genre = $_POST['dvd_genre'];
$dvd_year = $_POST['dvd_year'];
$dvd_length = $_POST['dvd_length'];
//insert to db
$sql = "INSERT into movies (dvd_title,dvd_director,dvd_classification,dvd_actors,dvd_genre,dvd_year,dvd_length) VALUES ('$dvd_title','$dvd_director','$dvd_classification','$dvd_actors','$dvd_genre','$dvd_year','$dvd_length')";
$result = mysql_query($db,$sql);
}
else{

?>


<form method="post" action="?">
DVD Title:<input type="Text" name="dvd_title"><br />
DVD Director:<input type="Text" name="dvd_director"><br />
DVD Classification:<input type="Text" name="dvd_classification"><br />
DVD Actors:<input type="Text" name="dvd_actors"><br />
DVD Genre:<input type="Text" name="dvd_genre"><br />
DVD Year:<input type="Text" name="dvd_year"><br />
DVD Length:<input type="Text" name="dvd_length"><br />
<input type="Submit" name="submit" value="Sumbit">

<?php

}

mysql_close($db);
?>




</body>

</html>

when i enter the data, the page goes blank (which im pretty sure its meant to), but the data isnt entered into the MySQL database.
I've asked -dt- on MSN and he couldn't find an error, so its probably someone hugely obvious, or something frustratingly small.

This post was edited on 11-11-2005 at 12:30 PM by lordy.
11-11-2005 12:27 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP/MySQL help - by lordy on 11-10-2005 at 12:04 PM
RE: PHP/MySQL help - by Dempsey on 11-10-2005 at 12:09 PM
RE: PHP/MySQL help - by lordy on 11-10-2005 at 12:34 PM
RE: PHP/MySQL help - by Dempsey on 11-10-2005 at 12:37 PM
RE: PHP/MySQL help - by -dt- on 11-10-2005 at 01:00 PM
RE: PHP/MySQL help - by lordy on 11-11-2005 at 12:27 PM
RE: PHP/MySQL help - by Dempsey on 11-11-2005 at 12:45 PM
RE: PHP/MySQL help - by lordy on 11-11-2005 at 12:54 PM
RE: PHP/MySQL help - by WDZ on 11-11-2005 at 02:05 PM
RE: PHP/MySQL help - by lordy on 11-11-2005 at 10:03 PM
RE: PHP/MySQL help - by lordy on 11-18-2005 at 03:41 AM
RE: PHP/MySQL help - by WDZ on 11-18-2005 at 04:50 AM
RE: PHP/MySQL help - by lordy on 11-18-2005 at 05:07 AM
RE: PHP/MySQL help - by WDZ on 11-18-2005 at 05:14 AM
RE: PHP/MySQL help - by lordy on 11-18-2005 at 05:21 AM
RE: PHP/MySQL help - by WDZ on 11-18-2005 at 05:28 AM
RE: PHP/MySQL help - by lordy on 11-18-2005 at 05:32 AM
RE: PHP/MySQL help - by WDZ on 11-18-2005 at 05:47 AM
RE: PHP/MySQL help - by lordy on 11-18-2005 at 05:50 AM
RE: PHP/MySQL help - by WDZ on 11-18-2005 at 05:53 AM
RE: PHP/MySQL help - by lordy on 11-18-2005 at 05:56 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On