Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,198 members, 7,818,657 topics. Date: Sunday, 05 May 2024 at 09:02 PM

Php Challenge - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Php Challenge (1362 Views)

The Greatest Programmer On Nairaland / Simple Php Challenge / Simple Code Challenge: C#, Java, C, C++ (2) (3) (4)

(1) (Reply) (Go Down)

Php Challenge by Nobody: 2:15pm On Dec 29, 2013
write a code line that uses all of the above elements: !, #, if
Re: Php Challenge by Nobody: 10:13am On Dec 30, 2013
will post on this soon
Re: Php Challenge by hollyfat(m): 1:17pm On Dec 31, 2013
adeoba: write a code line that uses all of the above elements: !, #, if
<?php //# has been used $name=$_POST['name']; if(!empty($name)){ $name=trim(addslashes(htmlentites($name))); echo "Welcome ".$name; } //All three have been used?>

1 Like

Re: Php Challenge by adepentane1(m): 1:45pm On Dec 31, 2013
hollyfat: <?php //# has been used $name=$_POST['name']; if(!empty($name)){ $name=trim(addslashes(htmlentites($name))); echo "Welcome ".$name; } //All three have been used?>


EXPLAIN BRO.....came out blank !!! Larner thou !!!
Re: Php Challenge by Nobody: 2:03pm On Dec 31, 2013
adepentane1:


EXPLAIN BRO.....came out blank !!! Larner thou !!!

It will com out blank if yu run dz code without writing a form yourself ... add dz to the code
<form action = "index.php" method="POST">

<input type="text" name="name" placeholder="enter name here " >

</form>
Re: Php Challenge by adepentane1(m): 8:30pm On Dec 31, 2013
iam_Demigod:

It will com out blank if yu run dz code without writing a form yourself ... add dz to the code
<form action = "index.php" method="POST">

<input type="text" name="name" placeholder="enter name here " >

</form>


owkay....i get...making sence to me gradually........
Re: Php Challenge by Nobody: 12:49am On Jan 01, 2014
adepentane1:


owkay....i get...making sence to me gradually........

Yeah! That's php with html
Re: Php Challenge by losprince(m): 2:52am On Jan 01, 2014
adeoba: write a code line that uses all of the above elements: !, #, if

<html>
<body>
<?php
#here is your first element op
if 2+2 !=5;
echo "2+2";
<body>
<html>

1 Like

Re: Php Challenge by Nobody: 10:47am On Jan 01, 2014
@answers: haba u guys 2 much... more than i was expecting smiley, especially hollyfat.
Re: Php Challenge by adepentane1(m): 1:24pm On Jan 01, 2014
losprince:

<html>
<body>
<?php
#here is your first element op
if 2+2 !=5;
echo "2+2";
<body>
<html>

This gave me 2+2 output in d browser.. .!!!
Re: Php Challenge by hollyfat(m): 6:44pm On Jan 01, 2014
adepentane1:


EXPLAIN BRO.....came out blank !!! Larner thou !!!
<?php $password="mypass"; //your required password if(isset($_POST["ok"])){
$pass=$_POST["pass"];
if($password!=$pass){echo "Incorrect Password<br/><a href=''>Retry</a>";}
else{
echo "Access Granted<br/>"
}
exit();
}
?>
<form action="#" method="post"><b> Enter Password To Continue</b> <div align='center'><input type='password' name='pass'/></div> <input type='submit' value='Login' name='ok'> </form>
Re: Php Challenge by Olyboy16(m): 7:54pm On Jan 01, 2014
//# used
if(1=1)echo (!isset($_POST)) ? "no post recieved on this page" : "posts has been recieved on this page";
Re: Php Challenge by Olyboy16(m): 8:04pm On Jan 01, 2014
This topic looks interesting, can u guys pls give it some more challenges?
Re: Php Challenge by Nobody: 8:35pm On Jan 01, 2014
Olyboy16: This topic looks interesting, can u guys pls give it some more challenges?
ok: add a valid php mysql statement to the code. smiley
Re: Php Challenge by Olyboy16(m): 8:48pm On Jan 01, 2014
adeoba: ok: add a valid php mysql statement to the code. smiley

hey, u should b posting this 4 every1 nt quoting me...
Nd to ansa dat.

//# $db is assumed an opened connection
&show=&db->query("show tables"wink;
if(!&show)die("error"wink;
else echo "success"
Re: Php Challenge by adepentane1(m): 8:11pm On Jan 04, 2014
undecidedGuys ... my wamp 5.04 is giving me headache.... my browser aint loading d php pages already created wit netbeans 6.5....
Re: Php Challenge by Nobody: 8:26pm On Jan 04, 2014
adepentane1: undecidedGuys ... my wamp 5.04 is giving me headache.... my browser aint loading d php pages already created wit netbeans 6.5....
duh... Have you checked your .htacess file?
Re: Php Challenge by losprince(m): 10:54am On Jan 06, 2014
adepentane1:

This gave me 2+2 output in d browser.. .!!!
wysiwyg
Re: Php Challenge by Nobody: 3:57pm On Jan 06, 2014
losprince:
wysiwyg
yeah lol cheesy
Re: Php Challenge by hobyner(m): 11:04pm On Jan 06, 2014
<?php
$thisyear = "2014";
if( $thisyear != "2013" ) {echo"<a href='#'>See 2013 calendar</a>";}
?>

1 Like

Re: Php Challenge by hobyner(m): 11:07pm On Jan 06, 2014
adepentane1: undecidedGuys ... my wamp 5.04 is giving me headache.... my browser aint loading d php pages already created wit netbeans 6.5....
Unistall and reinstall. U can try xampp. I use xampp
Re: Php Challenge by adepentane1(m): 11:11pm On Jan 09, 2014
lin to download xamp plzzz
Re: Php Challenge by sarutobi: 7:08am On Jan 10, 2014
<?php /**# */ $code = 'i am set'; if(!isset($code)): var_dump('yeeee'); else: var_dump('hawwww'); endif;
Re: Php Challenge by matrix4u(m): 9:54am On Jan 10, 2014
adepentane1:

This gave me 2+2 output in d browser.. .!!!
Yes That's the answer cos of the strings ""...
Re: Php Challenge by Nobody: 3:03pm On Jan 10, 2014
sarutobi: <?php /**# */ $code = 'i am set'; if(!isset($code)): var_dump('yeeee'); else: var_dump('hawwww'); endif;
wow. u guys are kool cool
Re: Php Challenge by cyrielo(m): 11:25pm On Jan 10, 2014
Write a simple loop program in php to print A-z or roman numerals 1 to 150 cool

Skills required php html css tongue

(1) (Reply)

App Developer Thread. / C++ Programmer Needed / Things You Need To Know About Programming

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.