[php]<?php
var_dump($_GET[‘u’]);
include(“connection.php”);
include(“uploadimage.php”);
if(isset($_POST['txtStartup'])) { $sName = $_POST["txtStartup"]; $sUserName = ''; if(isset($_GET['u'])) { $sUserName = $_GET['u']; } else { header("location:index.php"); } uploadimage(); $sDescription = $_POST["txtDescription"]; $sSql = "INSERT INTO communities(name, description, ownerid, image)VALUES('$sName', '$sDescription', '$sUserName', '$newfilename')"; $result = mysql_query($sSql); if($result > 0) { echo "go"; echo "";} else { echo "no"; echo "<script>alert('Startup already exists..!!')</script>"; }
}
else
{
echo “”;
}?>
body{margin: 2px 2px 0px 2px; font-family: Courier New;} input[type=text], textarea { -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; outline: none; padding: 3px 0px 3px 3px; margin: 5px 1px 3px 0px; border: 2px solid #DDDDDD; -webkit-border-radius: 11px 10px 12px 10px;-moz-border-radius: 11px 10px 12px 10px;border-radius: 11px 10px 12px 10px; width:236px; } input[type=text]:hover, textarea:hover { box-shadow: 0 0 5px rgba(81, 203, 238, 1); padding: 3px 0px 3px 3px; margin: 5px 1px 3px 0px; border: 2px solid rgba(81, 203, 238, 1); -webkit-border-radius: 11px 10px 12px 10px;-moz-border-radius: 11px 10px 12px 10px;border-radius: 11px 10px 12px 10px; } #dvMain{border-radius: 1px;} /* input[type=button]{width: 77px; background-color:#003366;border-radius: 5px; color: white ;border: 1px solid #000066;} input[type=button]:hover{background-color:#9dbcda;} */ table{background-color: #ffffff;} .p{color: #ff6347;font-family: Comic Sans MS;font-size: 11px;font-style: normal;} .btn, .btn input[type=image]{float: left; width: 76px;height: 26px;background-color:#003366;border-radius: 5px; color: white ;border: 0px solid #000066;} td{border: 0px solid #ffffff;} tr:hover{background-color:#FAFAFA;} Add StartupCREATE STARTUP
Name: Description: Upload image:
What is startup ? Brief startup here for user information ...!!
[/php] --------------------------------------- I am using fancybox to open this page and submit data in db. this works in normal popup like in window.open. But it does not save form data in db if i use fancybox.Here are code which i use to open this page in fancybox
Add Startups