A
Anonymous
Guest
hi..
I've created a guestbook and it works just great on my comp. but now when I put it on a free test server it won't work anymore...
I'm using a form with the post action thing to a new php page, and there I've done a $txt = $_POST["txt"]; connection. but something's not working, because nothing is entered into the database. is there a problem using that $txt = $_POST["txt"]; connection thing on some servers or something?
and I'm sure it's that or the form that's the problem. been trying to change everything else...
this is the code:
guestbook.htm
-------------------
<form name="guestbook" method="post" action="guestbook.php">
<p><br><table border="0" class="textsmallbold"><tr>
<td>Namn : </td>
<td><input type="text" name="namn"></td></tr>
<tr>
<td>E-post : </td>
<td><input type="text" name="epost"></td></tr>
<tr>
<td>Meddelande : </td>
<td>
<textarea name="txt"></textarea>
<input type="submit" name="Submit" value="Submit" class="button">
---------------------
guestbook.php
---------------------
<?php
$db = mysql_connect("localhost", "xxxxxx", "xxxxxx");
mysql_select_db("DB_nac88321",$db);
$namn = $_POST["namn"];
$epost = $_POST["epost"];
$txt = $_POST["txt"];
if ($txt) {
(insert query and all that)
?>
<?php
} else {
printf("<meta http-equiv='refresh' content='0;URL=forgot.htm'>\n");
}
?>
-------------
would be realy happy if someone could tell me what's wrong, and why... it just buggs me coz it worked fine until I put it on another server...
what happens when I try to enter a message to the guestbook is that it's just totaly ignored. it says I haven't put any text in the textbox... but I'm sure I have... and if I get rid of that "if ($txt)" thing nothing happens... one message is entered in the guestbook, but it's blanc. it's like nothing is sent to the guestbook.php page at all. or that the connection thing don't work...
please help..
-s
_________________
-------
stefan
-------
I've created a guestbook and it works just great on my comp. but now when I put it on a free test server it won't work anymore...
I'm using a form with the post action thing to a new php page, and there I've done a $txt = $_POST["txt"]; connection. but something's not working, because nothing is entered into the database. is there a problem using that $txt = $_POST["txt"]; connection thing on some servers or something?
and I'm sure it's that or the form that's the problem. been trying to change everything else...
this is the code:
guestbook.htm
-------------------
<form name="guestbook" method="post" action="guestbook.php">
<p><br><table border="0" class="textsmallbold"><tr>
<td>Namn : </td>
<td><input type="text" name="namn"></td></tr>
<tr>
<td>E-post : </td>
<td><input type="text" name="epost"></td></tr>
<tr>
<td>Meddelande : </td>
<td>
<textarea name="txt"></textarea>
<input type="submit" name="Submit" value="Submit" class="button">
---------------------
guestbook.php
---------------------
<?php
$db = mysql_connect("localhost", "xxxxxx", "xxxxxx");
mysql_select_db("DB_nac88321",$db);
$namn = $_POST["namn"];
$epost = $_POST["epost"];
$txt = $_POST["txt"];
if ($txt) {
(insert query and all that)
?>
<?php
} else {
printf("<meta http-equiv='refresh' content='0;URL=forgot.htm'>\n");
}
?>
-------------
would be realy happy if someone could tell me what's wrong, and why... it just buggs me coz it worked fine until I put it on another server...
what happens when I try to enter a message to the guestbook is that it's just totaly ignored. it says I haven't put any text in the textbox... but I'm sure I have... and if I get rid of that "if ($txt)" thing nothing happens... one message is entered in the guestbook, but it's blanc. it's like nothing is sent to the guestbook.php page at all. or that the connection thing don't work...
please help..
-s
_________________
-------
stefan
-------