Minggu, 18 Agustus 2013

PHP Indonesia - Facebook: hi can any one correct the error on line 7 ?? hel...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Refresh your vocabulary.

Learn a new word everyday by subscribing to Word of the Day. A great tool if you're studying for the GRE, GMAT or LSAT, or simply want to enhance your lexicon.
From our sponsors
hi can any one correct the error on line 7 ?? hel...
Aug 18th 2013, 09:48, by Arup Debnath

Arup Debnath 9:48am Aug 18
hi can any one correct the error on line 7 ??

help me plz

<?php
session_start();
if(isset($_SESSION['username'])) {
echo "You're already registered as $_SESSION[username].";
}
else if($_SERVER['REQUEST_METHOD'] == 'POST') {
if(!empty(trim($_POST['username'])) //Fatal error: Can't use function return value
// in write context
&& !empty(trim($_POST['email']))) {
$uname = htmlentities($_POST['username']);
$email = htmlentities($_POST['email']);
$_SESSION['username'] = $uname;
echo "Thanks for registering! <br />",
"Username: $uname <br />",
"Email: $email <br />";
}
else {
echo "Please fill out both fields! <br />";
}
}
else {
?>
<form action="test.php?username=overwritten" method="post">
<label for="username">Username:</label>
<input type="text" name="username" />
<label for="email">Email:</label>
<input type="text" name="email" />
<input type="submit" value="Register!" />
</form>
<?php } // End else statement ?>

Gunawan Mujur Wibisono 9:56am Aug 18
I tried gues about
else if
not
elseif

Arup Debnath 9:57am Aug 18
can u fix it?

Gunawan Mujur Wibisono 9:59am Aug 18
echo "Thanks for registering! <br />",
"Username: $uname <br />",
"Email: $email <br />";
why no using dot

Gunawan Mujur Wibisono 10:00am Aug 18
http://pastebin.com/1pkPQBHQ

Arup Debnath 10:00am Aug 18
using comma.. and the error is in line 7

Gunawan Mujur Wibisono 10:02am Aug 18
tried my code

Arup Debnath 10:02am Aug 18
same problem

Arup Debnath 10:03am Aug 18
is this working on your pc?

Gunawan Mujur Wibisono 10:04am Aug 18
is working

Arup Debnath 10:04am Aug 18
so what happened on me?
can u tell me?

Gunawan Mujur Wibisono 10:04am Aug 18
tried change
!empty(trim($_POST['username']))
into
!isset($_POST['username'])

Arup Debnath 10:07am Aug 18
no not working

Gunawan Mujur Wibisono 10:11am Aug 18
share ur full code in pastebin.com

Arup Debnath 10:12am Aug 18
pk

Arup Debnath 10:12am Aug 18
ok

Arup Debnath 10:15am Aug 18
done now what to do
?

Gunawan Mujur Wibisono 10:15am Aug 18
copy paste the link here

Arup Debnath 10:16am Aug 18
ya done

Arup Debnath 10:16am Aug 18
will any one correct it ?

Gunawan Mujur Wibisono 10:16am Aug 18
where the lin?

Arup Debnath 10:20am Aug 18
http://pastebin.com/3Zz8fMxq

Gunawan Mujur Wibisono 10:21am Aug 18
//Fatal error: Can't use function return value
// in write context
this include in your code??

Arup Debnath 10:22am Aug 18
yes

Arup Debnath 10:22am Aug 18
i just included the error as comment

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar