Solved

what's wrong with code

Posted on 2007-11-22
2
175 Views
Last Modified: 2008-02-01
whats wrong with this php script i made?
<?php
$popu      = $_POST['popularity'];
$webu      = $_POST['weburl'];
$fname      = $_POST['fname'];
$cemail      = $_POST['cemail'];
$minfo      = $_POST['minfo'];
 
 
if($popu == "" || $webu == "" || $fname == "" || $cemail == "" || $minfo == "") {
echo "<center><b>Please fill this out.</b><br><br></center>";
} else {
$line		.= "<b>----------------------------------</b>";
$addit     .= "Site: $webu<br>";
$addit     .= "Name: $fname<br>";
$addit     .= "Email: $cemail<br>";
$addit     .= "Popularity: $popu<br>";
$addit     .= "Comments: $minfo<br>$line<br>";
 
$file = "applications.html";
$fh = fopen($file, "a");
fwrite ($fh, "$addit");
fclose($fh);
echo "<center><font color='red'><b>Thanks! Application has been sent.</b></font><br><br></center>";
}
}
?>

Open in new window

0
Comment
Question by:fapathy
2 Comments
 
LVL 2

Accepted Solution

by:
HiTechFail earned 500 total points
ID: 20336804
Remove one of the last brackets at the end. That is also a bad way of doing applications, but if you just want to fix this one then just remove bracket.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20336865
HiTech and fapathy,

Seems these accounts both come from the same place, and it seems that it is mis appropriation of the point system.

Can you please explain what you are doing?

Thanks

Computer101
EE Admin
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP & MySQL - Rounding Results from a Select Query 3 25
Dynamic varibles 5 34
write screen output to text file 21 47
Fulfillment API php code sample 1 41
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question