NameSilo

Just started PHP

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
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.
GoDaddyGoDaddy
I haven't touched the php manual :guilty: I learned most of what I know about PHP by correcting to original authors mistakes. :p :lol:
 
0
•••
0
•••
I have heard the guy is starting out, I do not think that when you start out in php you go directly with OOP and books, do you? :) So most likely, he has a long journey to do in the php manual before reading books.
 
0
•••
Dont waste your money on books. There are thousands of php tutorials on the internet, that are free and will teach you more, and explain more than any book.

http://codewalkers.com
http://webmonkey.wired.com/webmonkey/programming/php/
http://phpfreaks.com
http://tutorialempire.com
http://tutorialized.com

Most of the "php" related forums, will be nice and help out a noob.

Best way to do math in php:

PHP:
$n1 = "3";
$n2 = "5";
$domath = ($n1 + $n2);
print $domath;

That is how i do math in php... its the easiest way...
 
0
•••
Designporte said:
I have heard the guy is starting out, I do not think that when you start out in php you go directly with OOP and books, do you? :) So most likely, he has a long journey to do in the php manual before reading books.

Neither do I. Congratulations in just conjuring something up out of nowhere.

I was merely stating that books are useful for advanced techniques to counter these people that think books are a waste, when they clearly are not.
 
0
•••
Sorry, I thought you were not stating but you did disagree that books are not useful for newbies, and I was stating that he doesn't need any books --not that books are not useful-- But If he was asking for a php book, and I said that he doesn't need one, you could disagree then.

Thanks.
 
0
•••
k dude
my first script
www.extremewebsitehost.com/email.html
BUT There is a problem
no matter wt user writes in the SUBJECT line it still sends the email with the subject {NO subject}

here is the code {DONT STEAL IT}
email.html
<form action="mail.php" method="post">
Your Name: <input type="text" name="name" size="20"><br>
E-mail: <input type="text" name="email" size="20"><br><br>
To: <input type="text" name="id" size="20"><br>
Subject: <input type="text" name="subject" size="20"><br>
Comments<br>
<textarea name="comments" rows="1" cols="20"></textarea><br><br>
<input type="submit" value="Submit">
</form>

mail.php
<?
$name=$_POST['name'];
$email=$_POST['email'];
$header=$_post['subject'];
$comments=$_POST['comments'];
$to=$_POST['id'];
$message=$comments;
if(mail($to,$header,$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
 
0
•••
PHP:
<?
$name=$_POST['name'];
$email=$_POST['email'];
$header=$_POST['subject'];
$comments=$_POST['comments'];
$to=$_POST['id'];
$message=$comments;
if(mail($to,$header,$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>

Try that for mail.php.
 
0
•••
wt did u change?
 
0
•••
CatchedCatched

We're social

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