Location: PHPKode > scripts > Random Text > admin/add.php
<?
/**
*
* @Script Random Text
* @version 1.0.0
* @copyright (c) Agrizlive.com
* @license You are allowed to modify this script. But you must provide a link of agrizlive.com in your footer (bottom of the page)
*
* Tested : PHP 5.2.11
*/

/**
*/
	include_once("login_verify.php");
	include_once("header.php");
	include_once("text_config.php");
	include_once("functions.php");
	
	
	if(isset($_REQUEST['submit']))
	{
		if(isset($_REQUEST['id']))
		{
			$status = edit_text();
		}
		else
		{
			$status = add_text();
		}
	}	
	if(isset($_REQUEST['id']))
	{
		$value = get_text($_REQUEST['id']);
	}
?>
			<div id="content" class="container_16 clearfix">
				<form method="post" action="" enctype="multipart/form-data">
				<div class="grid_16">
					<h2>Submit Text</h2>
					<?
						if(isset($_REQUEST['submit'])){echo "<p>".$status."</p>";}
					?>
				</div>

				<div class="grid_5">
					<p>
						<label for="url">URL <small>add http:// infront of url</small></label>
						<input type="text" name="url" value="<?=$value['url']?>" />
					</p>
				</div>

				<div class="grid_5">
					<p>
						<label for="rtext">Text <small>(250 characters. contact for more).</small></label>
						<textarea name="rtext"><?=stripslashes($value['rtext'])?></textarea>
					</p>
						
				</div>

				<div class="grid_16">
					<p class="submit">
						<input type="submit" value="Post" name="submit" />
					</p>
				</div>
				</form>
			</div>
		
<?
	include_once("footer.php");
?>		
Return current item: Random Text