Jump to content

Data transfer from earlier page to next page not happening


learner1901

Recommended Posts

I have a problem, when I am trying to create my own web page using Dreamweaver (PHP)

I have created a HTML page where data can be entered by user. After clicking “submit” button, next page is not able to show/ fetch the data entered in the previous page. As a web server I am using XAMPP .Code used:

Page -1

Name : “ Text field “ (name)

……….

……

Submit (form action “ show.php”)

 

Page 2 ( show.php)

<?php

$name = $_POST['name'];

$address = $_POST['address'];

$message = $_POST['message'];

?>

 

<html>

<head>

 

<p>Name : <?php echo $name ; ?></p>   

          <p>Address : <?php echo $address ; ?></p>

          <p>Message : <?php echo $message ; ?></p>

 

</html>

</head>

 

Please suggest where  I am going wrong.. It seems I am missing some basic stuff here.

Thanks in advance !!!

Please show your complete form ie

<form action="show.php" method="post">
<input type="text" name="somename" size="40" maxlength="80" value="default value"><br>

<input type="text" name="anothername" size="40" maxlength="80" value="default value"><br>

<input type="text" name="athirdname" size="40" maxlength="80" value="default value"><br>

<input type="submit" value="Submit">
</form>

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.