Php Problem
This is my Php Script i have made this script for my use but there is an error can any body help me
the problem is at the html tag »> <a href="$title" _base_target="frame3">$title </a><br> can any one help me.
<?php
$nav1="nav1.htm"
$nav2="nav2.htm"
$title = $_REQUEST['title'];
$message = $_REQUEST['message'];
$type = $_REQUEST['type'];
$today = date("F j, Y, g:i a");
if($type == "Link")
{
$Handle = fopen($nav2, 'a');
$Data1 = "» <a href="$title" _base_target="frame3">$title </a><br>";
fwrite($Handle, $nav2);
fclose($Handle);
echo "Data written for link $title";
}
elseif($type == "Topic")
{
$Handle = fopen($nav1, 'a');
$Data = "» <a href="$title" base="" target="frame3">$title </a><br>";
fwrite($Handle, $nav1);
fclose($Handle);
echo "Data written to Topic $title";
}
else
echo "No Match Found";
?>```
kiyoura wrote: i see your problem..when using php you must echo html/javascript for example
<?php echo "<form method='get' action=''>"; echo "<input type='text' name='name' /> ?> notice in the "" you must use '' or it wont work..hope this helps you
i got it but how to enter the tag data in the file….
thanxxxxx man the script worked….. as i wanted thanx a lot:):):):):):):):)
how evre there is an other problem plz help me in this script
$title = $_REQUEST['title'];
$message = $_REQUEST['message'];
$file="$title.htm";
$Handle = fopen($file, 'a');
$Data1 = "$message";
fwrite($Handle, $Data1);
fclose($Handle);
echo "Data written for link $title";
?>
if there is html tag for eg <a href="http://www.w3schools.com"> W3Schools</a>
the out put i get is
markuphttp://the-web-site-name/\"http://www.w3schools.com\"
plzzz helm for this…