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 !!!

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.