Hey Iam New Here And Iam Noob In Php

I Made A Web Site Directory Script

A Form So The User Can Post His Site And E Mail

This Site Show Directly

I Need To Make This Site Under Moderation First

Before It Show In Main Index File

I Have Admin Page

What Should I Do To Make Sites Waiting For Moderation First Before Its Show In The Dir

I Need Just To Know The Idea

in the table with the sites put a status field.
then when listing the sites check for status=1 (e.g. approved)
when inserting you will use status=0 by default

Thanks Can U Plz Send Me Example ?

Thats The Addsite Page

<?php
$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("dir", $con);

$sql="INSERT INTO info (SiteName, SiteLink, Email)
VALUES
('$_POST[sitename]','$_POST[sitelink]','$_POST[email]')";

if (!$_POST['sitename'] )
{
header("location:Empty_Fields.php?msg=Fields-Empty"); 
}

if (!$_POST['sitelink'] )
{
header("location:Empty_Fields.php?msg=Fields-Empty"); 
}

if (!$_POST['email'] )
{
header("location:Empty_Fields.php?msg=Fields-Empty"); 
}

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }

print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=./Success.php\"> ";

mysql_close($con)
?>

You Will Find Million Of Errors Coz Iam Noob Sorry

Plz Provide Me With The Code To Insert The Data In Db And Make It Under Moderation

Thanks So Much But Plz

CREATE TABLE `cmt_post` (
`post_id` int(5) NOT NULL auto_increment, `p_name` varchar(10) NOT NULL, `dt` date NOT NULL, `name` varchar(25) NOT NULL, `email` varchar(50) NOT NULL, `dtl` text NOT NULL, `status` varchar(4) NOT NULL default 'ns', UNIQUE KEY `post_id` (`post_id`,`p_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

Can You Short This Code To Include Just Only This Only

Site Name
Site Link
Status
Email

nope. if you're serious about learning php/mysql you should spend some time reading.
there aren't any shortcuts to greatness ;)

Hehe Ok Thank You :) I WIll Try To See What Can I Do Thanks Anyway

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.