Location: PHPKode > projects > Craigslist Classfieds PHP Clone Script > classifieds/addPosting.php
<?php

session_start();

include("URLs.php");

include("classes/AuthenticateUser.php");

$cityID = $_GET['cityID'];

$catID = $_GET['catID'];

include("Db.php");

include("classes/Sanitize.php");            

$cityID = Sanitize::clean($cityID);

$catID = Sanitize::clean($catID);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">



<head>

	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

	<title>Add a posting</title>

    

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>

    <script type="text/javascript" src="js/ajaxupload.js"></script>

    

    <script type="text/javascript">/*<![CDATA[*/

	$(document).ready(function(){

		new AjaxUpload('button3', {

			action: 'upload-handler.php',

			name: 'userfile',

			onComplete : function(file){

			   $("#example3 .files").append("<li><img src='<?php echo DOMAIN;?>/postingImages/<?php echo $_SESSION['userID']; ?>" + file + "'/></li>");

               $("#example3 .files").append("<input type='hidden' value='<?php echo $_SESSION['userID']; ?>" + file + "' name='imageList[]]'/>");

			}	

		});			

	});/*]]>*/</script>

    

</head>



<body>



<form action="classes/PostingAdd.php?cityID=<?php echo $cityID; ?>&catID=<?php echo $catID; ?>" method="post" name="addPost">



<input type="text" value="Post Name" name="name"/><br />

<textarea name="description">Description</textarea><br />

<input type="text" value="Price" name="price"/><br />

<input type="text" value="Specific Location" name="specificLocation"/><br />



<ul>

    <li id="example3" class="example">

        <div><input id="button3" type="file" /></div>

			<p>Uploaded files:</p>

			     <ol class="files"></ol>

    </li>

</ul>



<input type="submit" name="addPost" value="Adding Posting"/>



</form>



</body>

</html>
Return current item: Craigslist Classfieds PHP Clone Script