Board index   FAQ   Search  
Register  Login
Board index PHP Your Scripts

Basic Scripts Giving a Hard time...:(

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

Basic Scripts Giving a Hard time...:(

Postby VARUN006 » Fri Sep 09, 2011 3:05 am

<html>
<head>
<title>
hii
</title>
</head>
<body>
<form action="post2.php" method="post">
<p>First Name:<input type="text"

name="first_name" size="10"></p>
<p>Last Name:<input type="text"

name="name2" size="10"></p>
<p>Email:<input type="text" name="email"

size="15">
<p>Posting:<textarea name="posting"

rows="15" cols="20"></textarea></p>
<input type="submit" name="submit"

value="Send my feedback" />
</body>
</html>



-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<?php
$first_name=$_POST['first_name'];
$last_name=$_POST['name2'];
$email=$_POST['email'];
$posting=$_POST['posting'];
$name=$first_name .". $last_name;
print '$posting';
?>


pls help...
VARUN006
New php-forum User
New php-forum User
 
Posts: 21
Joined: Tue Jul 12, 2011 3:51 am

Re: Basic Scripts Giving a Hard time...:(

Postby egami » Mon Sep 12, 2011 4:25 am

1st ERROR: remove the double quote from this line, and use two single quotes with the space as you (I think) intended.

ie.
$name=$first_name .". $last_name;

should be...
$name = $first_name .' '. $last_name;


The second error:
This...
print '$posting';

should be...
print $posting;
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT


Return to Your Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.