Jump to content

How to get the contents inside <p> tag of an html file into a php file


amritags

Recommended Posts

Hai all,

 

    I want to retrieve the contents of a paragragh in html file to php file...... Is there a way to do this??

 

I tried the code below................................

 

html file

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>newdictionary</title>

</head>

<body>

<form name="f" action="newdictionary.php" method="post">

<p name="p">This is a paragraph</p>

<input type="submit" />

</form>

</body>

</html>

 

newdictionary.php

 

<?php

$name=$_POST["p"];

echo $name;

?>

 

How can i get this????Someone help........

 

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.