I have installed an apache v. 1.3.29 with php 4.3.4 and mysql 3.22 on my pc with win98 in order to test some scripts and I got a problem. I can`t pass variables from my browser to a php script. something goes wrong. i tested it on my host but it works fine.
I even wrote a very simple script in order to test it but still nothing
Here is the code:
<form action="process.php" method="post">
<input type="text" name="txt1"><br>
<input type="submit" name="btn1">
(first i created a mysql database named "test" with a table named table1 and a column named "sqtest" which is a VARCHAR(20)
mysql_connect("localhost", "", "") or
die("cannot select db");
$query="INSERT INTO table1(sqtest) VALUES ('$txt1')"
when i execute this starting from index.htm and check the database, the entry is creted blank. so I put to the beggining of process.php this line:
but the result is just nothing which means the $txt1 variable is blank. What`s wrong? Its for sure not in my code cause as i said i tested it on my host and it works.
The problem is that it doesn`t pass the value of the "txt1" text box to the process.php script. any ideas?
sorry for my bad English.