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
Close
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
Close
0
Close
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
Close
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
Close
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
Close
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
Close
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
Close
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
Close
wt did u change?
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back