Page 1 of 1

php error

Posted: Tue Mar 07, 2006 12:42 pm
by fourn443
well, i wasnt sure where to post this i just wanted some help, can some one look at this script and tell me wats wrong with line 66, i saved it and it said error on line 66
http://www.eznom.net/fourn443/test/add_url.php thats to the error
the error:
Parse error: syntax error, unexpected '>' in /home/eznom34/public_html/fourn443/test/add_url.php on line 66


the script (its not finished so if you think thats it tell me)

Code: Select all

<?php # Script 12.5 - ad_url.php
$page_title = 'Ad a URL';
include ('./includes/header.html');
require_once ('../mysql_connect.php');

if (isset($_post['submitted'])) {

if (eregi('^([[:alnum:]\-\.])+(\.)([[:alnum:]]){2,4}([[:alnum:]/+=%&_\.~?\-]*)$',$_post
['url'])) {
$u = escape_data($_poste['url']);
} else {
$t = false;
echo '<p><font color="red">Please enter a URL name/title!</font></p>';
}

if (!empty($_POST['description']));
} else {
$d = FALSE;
echo '<p><font color="red">Please enter a description!</font></p>';
}

if (isset($_post['types']) && (is_array ($_post['types']))) {
$type = true;
} else {
$type = false;
echo '<p><font color="red">
Please select at least one catagory!</font></p>';
}

if ($u && $t && $d && $type) {
$query = "INSERT INTO urls (url, title, description) VALUES ('$u', '$t', $d')";
$result = @mysql_query ($query);
$uid = @mysql_insert_id();

if ($uid > 0) {

$query = 'INSERT INTO url_associations (url_id, url_catagory_id, approved)
VALUES ';
foreach ($_post['types'] as $v) { $query .= "($uid, $v, 'y'), ";
}
$query = substr ($query, 0, -2);

$result = @mysql_query ($query);

if (mysql_affected_rows() == count($_post['types'])) {

echo '<p><b>Thank you for your submission!</b></p>';
$_post = array();

} else {

echo ' <p><font color="red">Your submission could not be processed due to system error. We do apologize for any inconvenience.</font></p>';
echo ' <p><font color="red">' .mysql_error() .' <br /><br />Query: ' / $query .'
</font></p>';

$query = "DELETE FROM urls WHERE url_id=$uid";
@mysql_query ($query);
}
} else {
echo ' <p><font color="red">Your submission could not be processed due to a system error.
we apologize for any inconveniance.</font></p>';
echo ' <p><font color="red">' .mysql_error() .' </font></p><br /><br />Query: ' / $query .'
}

} else {
echo ' <p><font color="red">Please Try Again.</font></p>';
}
}


Posted: Tue Mar 07, 2006 12:47 pm
by nsilva
Hey genious, you gotta tell me how to caode Halo PC with php.
Scripting and Programming
Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Moderators Moderators, Junior Admins
- <3 nsilva

Posted: Tue Mar 07, 2006 12:49 pm
by fourn443
oops, i said i didnt know where to post it, didnt i? and this is the SCRIPTING and programming section

fo

Posted: Tue Mar 07, 2006 3:15 pm
by nsilva
fourn443 wrote:oops, i said i didnt know where to post it, didnt i? and this is the SCRIPTING and programming section

fo
OH, well. I didnt read that i was too busy gettign ready to rub it in.

If you want to know what forum then that definitley not even on this site, cause it aint a coding site :P

Posted: Wed Mar 08, 2006 12:19 pm
by fourn443
can ne1 help me?

Posted: Wed Mar 08, 2006 1:18 pm
by nsilva
I could, but, idn.

Just going to throw this out for ya.

Are you missing a ;?

Posted: Wed Mar 08, 2006 4:30 pm
by fourn443

Code: Select all

echo ' <p><font color="red">Please Try Again.</font></p>';