Location: PHPKode > projects > FeedMeLinks, Social BookmarkingSince2002 > feedmelinks.com/contribute/features/do-add.inc.php
<% # $Id: do-add.inc.php,v 1.3 2004/04/07 04:06:48 hirokai Exp $ %>
<% 
	include_once( "../../modules/utils.inc.php" ); 
	$tok =  $authenticated = $_COOKIE["c_pass_token"];
	$u   =  $sessionUserId = $_COOKIE["c_uid"];
	if( $tok && $tok == md5( getPasswdForUser( $u )) ) {
%>

<p />

<%
	if( $name && $desc && $type ) {
		$name = prepForDB( $name );
		$desc = prepForDB( $desc );
		$type = prepForDB( $type );

		$qs = "INSERT INTO linksFeatures VALUES (NULL, NULL, \"$u\", \"$name\", \"$desc\", $type, NULL);";
		if( $debug )
			echo $qs;
		mysql_connect( );
		mysql_selectdb( getDBName() );

		$q = mysql_query( $qs );
		if( $q ) {
			echo "added your request...";
%>
<meta http-equiv=Refresh content="1; URL=/contribute/features" />
<%
		} else {
			echo "problem occurred; could not add your request";
		}
		mysql_close();
	} else {
%>

<div class="attention">
please fill out the form completely with a name and description.<br /><a href="javascript:history.go(-1);">&laquo; go back</a>.
</div>

<%
	}
} else {
	echo "you must log in to request features";
}

%>


Return current item: FeedMeLinks, Social BookmarkingSince2002