NameSilo

Just started PHP

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
19
Hey
I just started some php tutorials and i just tried coding this

<html>
<body>
<?php
$zubair0="1";
$zubar01="2";
$zubair="$zubair0+$zubair01";
print "Hi" . " " $zubair; ?>
</body>
</html>

but the code didnt work
can u tell me what i did wrong since its not working

see it for urself

http://extremewebsitehost.com/testing.php
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
www.l3h.net/test.php

Added where it displays the time :)

Here's the full code:
Code:
<html>
<body>
<?php

$zubair0=1;
$zubair01=2;
$zubair=$zubair0+$zubair01;

print "Hi" . " " . $zubair;
echo '<br />';

print "IF and else statement";
echo '<br />';

$d=date("D");

if ($d="thu")

echo "Today is Thursday";
else
echo "Today is not Thursday bro";
echo '<br />';

$today = date("G:i:s T Y");
echo $today;
?>

</body>
</html>
 
1
•••
wts
G:I:S: T Y for?
 
0
•••
G:i:s is the time in 24 hour format

T is the time zone

Y is the year
 
0
•••
okay awesome :P
I am searching google to see if i can find a tutorial that teachs u how to make specific stuff like GUESTBOOK etc..DO u know of anything like dat?
Vid tuts r BETTER
p.s: i dont wana work wid mysql..only PHP for now

2. Can i make that clock so it refreshes itself for seconds...
 
0
•••
0
•••
I don't know of any guestbook tutorials that don't use mySQL..... but i know how you feel, i didn't want to learn mySQL either.... i still haven't, i use ASP with SQL if i want any database work :)

if you want a major project you could try making your own guestbook from scratch... learn about using the FPUT command to put data into a text file, and use that as your method for storing messages, the rest can be worked around that.... it wont be easy though, im sure there are plenty of people here (including myself) who will help you with any problems



As for the clock, im not sure, if you find a method of refreshing that doesn't look like the whole page is refreshing.... let me know, i have a shoutbox on my site and its terrible because even though its in an iframe, it appears as if the whole page is refreshing
 
Last edited:
0
•••
Thanks wild :P I will let u know if i face any problem :)
 
0
•••
no probs :)
 
0
•••
0
•••
unknowngiver said:
wow
lol
look at my first script
http://extremewebsitehost.com/main.php
lol...

OKay is there a easy way of adding space then using
. " " . command?


lol, i got this

Today is ThursdayIt's Jul.1.th
and its 13:08:42 EDT 2005

might need fine tuning B-)
 
0
•••
it cool, you may want to start a new line for the date
also why is it telling me its the 1st july

-------------------

i don't think there is an easier way than . " " . sorry
 
0
•••
I dont know...Thats wt making me go all nuts too
lol
here is the code


<?php
$d=date("M.I.S");
$t = date("G:i:s T Y");
$b=date(l);
echo '<br>';
echo "Today is" . " " . $b ;
echo "It's" . " " . $d ;
echo '<br>';
echo "and its" . " " . $t;
?>

Wow untill today i thought making forums and those scripts was easy :P lol now i know how hard php is :p
 
0
•••
maybe the time is set really bad on the server lol
 
0
•••
unknowngiver said:
I dont know...Thats wt making me go all nuts too
lol
here is the code




Wow untill today i thought making forums and those scripts was easy :P lol now i know how hard php is :p

Try writing your own php template engine thats when the funs begins lol
 
0
•••
whats one of those?
 
0
•••
lol dude this is my first day on PHP and i m doing it from my summer school lol

and i m in my TECH class..they are teaching me all the borin stuff {COREL DRAW!!!} SO YEA

i asked my COMPUTER teacher if he could help me wid this php since i m done the work and he was like...WHATS PHP
36_11_6%5B1%5D.gif
 
0
•••
Try that :)
PHP:
<?php

$d= date("M.I.S");
$t= date("G:i:s T Y");
$b= date(l);

echo "Today is" . " " . $b ;
echo '<br />';

echo "It's" . " " . $d ;
echo '<br />';

echo "and its" . " " . $t;
?>
 
Last edited:
0
•••
ah i was at college for a year but i left after the first year because it wasnt for me....

Access Databases
Excel Spreadsheets
Presenting Info (writing letters etc)

all stuff like that


and one time, my course director asked me to print off a copy of some coding i had done for a macro in a spreadsheet.... she said she wanted to look at it and learn from it and see how i had done it :-/ :-/ :-/

I didn't do a lot of learning lol

Also the course director was really biased, if you didn't do something her way, you were doing it the wrong way
 
0
•••
PHP is not hard at all comparing it to similar server side languages. You just need to get used to many functions and teach yourself on example by example basis.

Also, you do not need any books or tutorials other than spending some time on php.net/manual/en daily. W3shools is good if you never wrote a script, or you know only few things about the script sturcture basics, like defining variable, assigning it, using if/else.. :)

Good luck :tu:
just spend some time on php official manual ;)
 
0
•••
Thanks Ahmed :D
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back