Jump to content

what is wrong with my damn code


+ ___ +

Recommended Posts

<?php
if(isset($_POST['info']))
{
echo $_POST['info'];
}
else
{
?>
<html>
<head>
<style type="text/css">
.fullwidth { width: 100%; }
</style>
</head>

<body>
<form id="giveinfo" name="giveinfo" method="POST" enctype="multipart/form-data">
<textarea id="info" name="info" class="fullwidth" rows="50">
Type stuff here
</textarea>
<input type="submit"/>
</form>
</body>

</html>

<?php

}


?>

 

ok try running this code, it doesn't show anything when i submit the info.

Link to comment
https://forums.phpfreaks.com/topic/49042-what-is-wrong-with-my-damn-code/
Share on other sites

Try out this:

<?php
if(isset($_POST['info']))
{
echo $_POST['info'];
}
else
{
?>
<html>
<head>
<style type="text/css">
.fullwidth { width: 100%; }
</style>
</head>

<body>
<form id="giveinfo" name="giveinfo" method="POST" action="filename.php">
<textarea id="info" name="info" class="fullwidth" rows="50">
Type stuff here
</textarea>
<input type="submit"/>
</form>
</body>

</html>

<?php

}


?>

 

Change action=filename.php to ur this script name.

Or also u can try it like this:

<form id="giveinfo" name="giveinfo" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

 

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.