473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem witch read input string_____

I have php4 on system FreeBSD.I did think that php work very well
(function phpinfo() work), if I didn't probe above script:

<?
if(!isset($name)&&!isset($password))
{
?>
<h1>Please Log In</h1>
This page is secret.
<form method = post action = "secret.php">
<table border = 1>
<tr>
<th> Username </th>
<td> <input type = text name = name> </td>
</tr>
<tr>
<th> Password </th>
<td> <input type = password name = password> </td>
</tr>
<tr>
<td colspan =2 align = center>
<input type = submit value = "Log In">
</td>
</tr>
</form>
<?
}
else if($name=="user"&&$password=="pass")
{
echo "<h1>Here it is!</h1>";
echo "I bet you are glad you can see this secret page.";
}
else
{
echo "<h1>Go Away!</h1>";
echo "You are not authorized to view this resource.";
}
?>

Always is fine but php don't read my input string.$name and $password
always = ""
What the problem?

Sorry for my litle english.
Mioduszaewski Artur.


Jul 16 '05 #1
2 2230
kliczko wrote:
I have php4 on system FreeBSD.I did think that php work very well
(function phpinfo() work), if I didn't probe above script:

Your register_globals is set to "OFF". That's the new default value.
Add this lines to the begin of your script:

$name = $_REQUEST["name"];
$password = $_REQUEST["password"];

I don't think it's a good idea to turn register_globals on, so use the
$_REQUEST Superglobal instead.

Hope that helps

Sebastian
Jul 16 '05 #2
kliczko wrote:
I don't think it's a good idea to turn register_globals on,


I have a litle knowledge about php, so how turn on the
register_globals.Give me a detailed describe how this doing.(in what
file?)

I forgot the word not in my last posting =)

If you realy want, you may activate it in the php.ini

Hope that helps
Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
8
by: Brady | last post by:
Hi, I'm having a problem reading and writing to a file. What I'm trying to do is read a file, modify the portion of the file that I just read, and then write the modified data back to the same...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
10
by: Voya | last post by:
Hi i work in VB practicly from the start but I have problem now .... i have dataset in witch i have to tables witch are connected (parent - child) and whan i want to select some rows in child table...
0
by: Slawomir Nasiadka | last post by:
Hi, I'am new to this group so I would like to say "Hello" everyone and here is my problem: I'm writing a simple application (code is at the end of this message) witch would list all mails...
0
by: claudiuvior | last post by:
I have two tables : STUDENTS Idx N 4 PRIMARY KEY, Name C 20 NOT NULLL UNIQUE, Status C 15 with one of the valor: P, R, E, A REZULTS Idx N 4 CS Note N 5,2 pozitiv
7
by: Richard S | last post by:
alright, first of all i love thise site, helped me out alot alreaddy, but now i have a problem witch i cant find a answer to after a LONG time of searching. I am trying to make a small search,...
5
by: Mohawk Mawk | last post by:
Hey guys... I have a image string I want to read with exif_read_data() but exif_read_data() does not read strings, only files. i can display the picture via php Header( "Content-type:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.