I got the following error on page:
Parse error: parse error, unexpected T_ECHO in /home2/racingri/public_html/new_ad.php on line 25
Here is the code:
[code=php]<?php
require(‘header.php’);
//If you’re not logged in…
if($user->name == ”)
{
echo ‘Sorry, you must be logged in to post an ad…’;
require(‘footer.php’);
die(”);
}
//If you’re trying to post a new ad
if(isset($_POST[‘NewAd’]))
{
//Create the CAd object, and create the ad
$ad = new CAd($sql);
var_dump($_POST);
var_dump($_FILES);
if($ad->NewAd($user->ID, $_POST[‘title’], ((isset($_POST[‘image_l’]) && $_POST[‘image_l’] != ”) ? $_POST[‘image_l’] : $_FILES[‘image_f’]), $_POST[‘category’], $_POST[‘price’], nl2br($_POST[‘info’]), $_POST[‘location’]))
echo ‘<script language=”JavaScript”>alert(“Success. Your ad has been placed.”);</script>’;
}
echo ‘<input type=”checkbox” name=”premier” value=”permier”>’;
echo ‘<input type=”checkbox” name=”bold” value=”bold”>’;
echo ‘<input type=”checkbox” name=”border” value=”border”>’;
if(isset($_POST[‘premier’]) echo(“this checkbox has been checked!”));
if(isset($_POST[‘bold’]) echo(“this checkbox has been checked!”));
if(isset($_POST[‘border’]) echo(“this checkbox has been checked!”));
If anyone can help, that would awesome! ? Thanks