Advertisement Form






[insert_php]

if(isset($_POST[‘submit’]))
{
$name_ = $_POST[‘name_’];
$email_ = $_POST[’email_’];
$offering_ = $_POST[‘offering_o’];
$description_ = $_POST[‘description_’];

$imgname = $_FILES[‘image_’][‘name’];
$imgdata = file_get_contents($_FILES[‘image_’][‘tmp_name’]);
$imgtype = $_FILES[‘image_’][‘type’];
$img_tmp_name = $_FILES[‘image_’][‘tmp_name’];

$conni=mysqli_connect(‘localhost’,’worldcpx_wp678′,’vH713@Sp[e’);
$selected=mysqli_select_db($conni,’worldcpx_wp678′);

if($conni)
{
if(substr($imgtype,0,5) == ‘image’)
{
move_uploaded_file($img_tmp_name,’/home/worldcpx/public_html/advertising_pics/’.$imgname);
$query = “INSERT INTO advertising_members VALUES(NULL,’$name_’,’$email_’,’$offering_’,’$description_’,’$imgname’)”;
if(mysqli_query($conni,$query))
echo ““;

}
}
}
[/insert_php]