Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
In the below script you see a string length counter
This script is working fine but i have a problem
When first time i open this page in my browser it show an error in line 2
(explained in image 2)
But when u enter the test string the error removed
I can't remove the 'test' variable
b'coz i have to work with it
Can anybody help me to to remove this erro line in the browserCode: Select all
<?php
$var = $_GET["test"];
$len = strlen($var);
if($len > 0)
{
echo $len;
}
else
{
echo "error: no input";
}
?>
<form action="var_test.php" method="GET">
<input type="text" name="test" >
<input type="submit" value="Click Here">http://img76.imageshack.us/img76/4466/untitledkc2.gif
Image 2
http://img67.imageshack.us/img67/3272/untitled2ab1.gif
Image 3
http://img67.imageshack.us/img67/5409/untitled3xb8.gif
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]