Jump to content

@fopen @fwrite @fclose doesnt work need help, using variables ><


Minimeallolla

Recommended Posts

if(isset($_COOKIE['ID_my_site']))
{
	$username = mysql_real_escape_string( $_COOKIE['ID_my_site'] ); 
	$pass = mysql_real_escape_string( $_COOKIE['Key_my_site'] );

	$check = mysql_query("SELECT * FROM users WHERE username = '$username' AND password = '$pass'")or die(mysql_error());

	while($info = mysql_fetch_array( $check )) 	
	{
		if ($pass == $info['password']) 
		echo "$username";
	}
}

	 if (isset($_POST['submit'])) { 

$firstname = ($_POST['firstname']);
$lastname = ($_POST['lastname']);


$filename = "***/$username.info.php" or exit("Unable to open file!");
$handle = @fopen($filename, 'x+')or die(mysql_error()); 
$content = "nothing i enter here gets inserted into the file";
@fwrite($handle, $content)or die(mysql_error()); 
@fclose;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.