Dating Website
Posted: Tue Feb 24, 2004 3:53 pm
edit patrikG: too many dots in the thread-subject. Please refrain from doing that
Hi there im from Ireland and im 22 and im a third year Computing with Multimedia student. For my third year project i am creating a dating website.
Now i am not too familar with MYSQL or PHP but i am learning rapidly enough. However when i wrote up a program to send data to a table on my database the dammed thing keeps giving me error messages and i dont know why?
I am using Foxserve as my local host and MYSQLadmin or whatever its called but it just wont work. Take a look and id really appreciate the help.
Des,
This is the error message im getting off one of the lines
"Parse error: parse error, unexpected '>' in C:\FoxServ\www\data_in.php on line 24"
Weirdan | Help us, help you. Please use
Hi there im from Ireland and im 22 and im a third year Computing with Multimedia student. For my third year project i am creating a dating website.
Now i am not too familar with MYSQL or PHP but i am learning rapidly enough. However when i wrote up a program to send data to a table on my database the dammed thing keeps giving me error messages and i dont know why?
I am using Foxserve as my local host and MYSQLadmin or whatever its called but it just wont work. Take a look and id really appreciate the help.
Des,
Code: Select all
<HTML>
<HEAD>
<TITLE>Putting data</TITLE>
</HEAD>
<BODY>
<?php
/* This program enters news items into a database */
if(isset($submit)):
$db = mysql_connect ("localhost", "root");
mysql_select_db ("php", $db);
$date = date("Y-m-d");
$sql = "INSERT INTO news
VALUES (NULL, '$heading','$body', '$date',
'$auth', '$auth_email');
mysql_query($sql);
print("<h2>The data has been entered.</h2>");
print("<b>You can adda nother news story below</b>");
endif;
?>
<h1>Enter your news item into the database</h1>
<form action="data_in.php" method="post">
Name:<br> <input type ="text" name="auth">
Email:<br> <input type ="text" name="auth_email">
Heading:<br> <input type ="text" name="auth">
News:<br> <input type ="text" name="body">
<input type="submit" name"submit" value="Submit News!">
</form>
</body>
</html>This is the error message im getting off one of the lines
"Parse error: parse error, unexpected '>' in C:\FoxServ\www\data_in.php on line 24"
Weirdan | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]