hi
----------------------------------------------------------------------------------------------------
error log "[Sat Jan 09 17:40:00 2010] [error] [client 127.0.0.1] PHP Notice: Undefined variable: a1 in C:\web\htdocs\Filey\2.php on line 2, referer: http://localhost/Filey/1.php"
"[Sat Jan 09 17:40:00 2010] [error] [client 127.0.0.1] PHP Notice: Undefined variable: a3 in C:\web\htdocs\Filey\2.php on line 3, referer: http://localhost/Filey/1.php"
"[Sat Jan 09 17:40:00 2010] [error] [client 127.0.0.1] PHP Notice: Undefined variable: a2 in C:\web\htdocs\Filey\2.php on line 4, referer: http://localhost/Filey/1.php"
---------------------------------------------------------------------------------------------------
2.php
----------------------------------------------------------------------------------------------------
Code: php
$filler1 = "<html><head><title>$a1</title>";
$filler2 = "<body>$a3";
$filler3 = "<div>$a2</div></body></html>";
$a1 = $_POST["PN"];
$a2 = $_POST["Date_name"];
$a3 = $_POST["Note"];
$myFile = "notenw.html";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "$filler1";
$stringData1 = "$filler2";
$stringData2 = "$filler3";
fwrite($fh, "$stringDatan");
fwrite($fh, "$stringData1n");
fwrite($fh, "$stringData2n");
fclose($fh);
?>
-------------------------------------------------------------------------------------------------
1.php
Code: <?php require_once $_SERVER['DOCUMENT_ROOT'] . '/Login/common.php';?>
<?php if ($_SESSION['userName'] == 'Adamriley') { $name = 'Adam lee riley';} else { $name = 'Nathan Warburton';}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled Page</title>
<script language="JavaScript" type="text/javascript">
<!--
function ValidateForm1(theForm)
{
var strFilter = /^[A-Za-zƒŠŒŽšœžŸÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞßà áâãäåæçèéêëìÃîïðñòóôõöøùúûüýþÿ trnf0-9-]*$/;
var chkVal = theForm.TextArea1.value;
if (!strFilter.test(chkVal))
{
alert("In your note you may only have a maximum of 100 letters");
theForm.TextArea1.focus();
return false;
}
if (theForm.TextArea1.value == "")
{
alert("In your note you may only have a maximum of 100 letters");
theForm.TextArea1.focus();
return false;
}
if (theForm.TextArea1.value.length < 2)
{
alert("In your note you may only have a maximum of 100 letters");
theForm.TextArea1.focus();
return false;
}
if (theForm.TextArea1.value.length > 100)
{
alert("In your note you may only have a maximum of 100 letters");
theForm.TextArea1.focus();
return false;
}
return true;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="bv_Form1" style="position:absolute;left:58px;top:59px;width:704px;height:356px;z-index:5;" align="left">
<form name="Form1" method="POST" action="2.php" id="Form1" onsubmit="return ValidateForm1(this)">
<input type="text" id="Editbox2" style="position:absolute;left:94px;top:36px;width:483px;font-family:Courier New;font-size:16px;z-index:0" name="Date_name" value="<?php echo date("F j, Y, g:i a"); ?> || <?php echo $name ?>" readonly="readonly">
<input type="text" id="Editbox1" style="position:absolute;left:93px;top:4px;width:489px;font-family:Courier New;font-size:16px;z-index:1" name="PN" value="Page name (title)">
<textarea name="Note" id="TextArea1" style="position:absolute;left:81px;top:63px;width:547px;height:215px;font-family:Courier New;font-size:16px;z-index:2" rows="10" cols="51"></textarea>
<input type="submit" id="Button1" name="Button1" value="Save changes" style="position:absolute;left:336px;top:293px;width:194px;height:41px;border:3px #98FB98 solid;background-color:#0000FF;color:#FFFF00;font-family:Bookman Old Style;font-size:27px;z-index:3">
<input type="reset" id="Button2" name="Reset" value="Reset note" style="position:absolute;left:158px;top:291px;width:167px;height:44px;border:3px #FFFF00 dotted;background-color:#00FF00;color:#FF0000;font-family:Arial;font-size:27px;z-index:4">
</form>
</div>
<div id="bv_Text1" style="position:absolute;left:334px;top:9px;width:150px;height:32px;z-index:6;" align="left">
<font style="font-size:27px" color="#FF0000" face="Arial"><b>New note</b></font></div>
</body>
</html>
How to restrict the display of report variants
Hello All,
Help with page encoding issue and weird characters
I'm trying to write a screen scraper and when I pull out the lines of the html file that I'm interested in and put them in a variable, I end up with a few extra weird characters in my string that I
Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the right posted. That database is set up to keep post id, title, subject, date, and author. The only
echo $rows help
Hi all,Hopefully something simple that I don't know!I have this:Code: [Select]<div id="marquee"><?php$query = mysql_query("SELECT stock_id, stock_code, t_val, y_val
elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and so far it's been quite smooth. However whilst trying to change an aspect of the game from giving the
Gantt Chart Tool
Does anyone know of a good free gantt chart creator toolThanks
Passing vars to the DB
I have 3 small testing tables:ID TYPE1 pepperoni2 C. bacon3 tacoID TYPE1 small2 med3 largeID TYPE1 bud2 hef3 mil best4 7up5 orange6 cokeEach one is a select menu. How would I pass these as
Uploading/Downloading files stored in MySQL database
Hey all,This problem just came up in my website and I'm having a hard time figuring out what's wrong. I have a intranet portal running (custom built) and I'm storing all different types of documents
Getting PHP to ammended the selected in option field
Hey Guysthanks for everyones help so far. This site and its users are oozing awesomness.I am busy with a php script for editing users, of which 1 field is the TITLE of the person (mrs, miss, ms) and
ORA-01017: invalid username/password; logon denied
Dear All,