insanemonkey
04-21-2008, 02:13 PM
hi I am trying to make something to do as insert into my database...
i have done this before and i dunno why its not working.. plz help.
<?PHP
include('dbconnect.php');
if (!isset($_POST['submit'])) {
?>
<form action="insertdl.php" method="post">
url: <input name="url" type="text">
<input type="submit" value="submit" name="submit">
</form>
<?PHP
} else {
$url = $_POST['url'];
$count = 1;
mysql_query("INSERT INTO downloads
(link, count) VALUES('$url', '$count' ) ")
or die(mysql_error());
echo' "data inserted";
}
?>
plz help
i have done this before and i dunno why its not working.. plz help.
<?PHP
include('dbconnect.php');
if (!isset($_POST['submit'])) {
?>
<form action="insertdl.php" method="post">
url: <input name="url" type="text">
<input type="submit" value="submit" name="submit">
</form>
<?PHP
} else {
$url = $_POST['url'];
$count = 1;
mysql_query("INSERT INTO downloads
(link, count) VALUES('$url', '$count' ) ")
or die(mysql_error());
echo' "data inserted";
}
?>
plz help