Jump to content

a weird problem of redirection !!!


webtuto

Recommended Posts

hi i made a code an when i lick on the button send it redirect to the page dedicace.php

the wierd thing is that in the whole script there is not something named dedicace.php

	<center>
<table border=0>
<form method="post" action="show.php?id=<?php echo $id; ?>" >
<tr><td>nom<td><input type="text" name="name" ></tr>
<tr><td>message<td><textarea cols=20 rows=10 name="coms" ></textarea></tr>
<tr><td><td><input type="submit" name="send" value="send" ></tr>
</form>
</table>
<?php
$name=mysql_real_escape_string(htmlspecialchars(trim(addslashes($_POST['name']))));
$coms=mysql_real_escape_string(htmlspecialchars(trim(addslashes(nl2br($_POST['coms'])))));
$date=date("y,m,D");
if($_POST['send']){
if(!empty($name) and !empty($coms) ) {
$sql="insert into coms set name='$name' , coms='$coms' , date='$date' , photo_id='$id' ";
$res=mysql_query($sql);
  }
}

Link to comment
https://forums.phpfreaks.com/topic/87208-a-weird-problem-of-redirection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.