0

hi all,
in my insert project page wen i am above to insert project if the project size is greater than the allocated size then it should display some alert message,but my code not displaying anything.so please check my code.
Thank u.

<script language="javascript" type="text/javascript">
window.close();
</script> 
<?php
$id=$_GET['f1'];
@session_start();
require_once ("check.php");
createsessions($username,$password,$userid,$projectid,$projectname,$filename,$size,$allocatedmemory,$answer,$usedmemory);
$con=mysql_connect("10.70.1.50","invensis","invensis");
if(!$con)
	{
		die('Could not connect: ' . mysql_error());
	}
mysql_select_db("database_myproject",$con);
if($_SESSION[usedmemory] < $_SESSION[allocatedmemory])
{
$sql="INSERT INTO projects(projectname,allocatedmemory,createdby)
VALUES ('$_POST[projectname]','$_POST[allocatedmemory] $_POST[size]','$_SESSION[username]')";
echo "New Project Added";
if(!mysql_query($sql,$con))
 {
 	die('Error:' . mysql_error());
 }
}
else  
{
echo "cannot add project"; 
}
?>
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by almostbob
0

the first clientside is window.close();
nothing will display in a closed window
try the same code with the javascript to close the window AFTER the information is displayed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.