Topic: "could you help a PHP beginner?" (page 1 of 2)

1 2 >
Author Post
kapax
groupmastergroupmaster
here is the problem:
one file - text.html looks like this:

<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=GET ACTION="text.php">
Who is your favourite author?
<INPUT NAME="Author" TYPE="TEXT">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>


another - text.php, like this:

<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $Author;
?>
</BODY>
</HTML>



i have set up PHP on Apache web server on my computer only yesterday and i am learning PHP at the moment. but this example, given in the book, is not working for me. why could this problem appear? other, simple PHP scripts (e.g. <?php
$CarType = "Pontiac";
$EngineSize = "3.0";
$Space = " ";
$Car = $CarType . $Space . $EngineSize;
echo $Car . $Car;
?>
) are working.

thank you for your help :-)
private message
BaRa
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Edited by BaRa on 10.06.2006 15:40:21
private message
kapax
groupmastergroupmaster
umm yeah, when i added $Author = $_GET["Author"];, it started working... why those people are writing book if they don't even know PHP :noclue:
thank you :-)
private message
BaRa
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Which book is it, and how much did you pay for it?
BaRa
private message
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
for security (if you start to use it to call stuff from db) you should use $author = strip_tags($_GET['Author']);
private message Website
Gome
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
has todo with magic variables i believe.. some settings in php make all the _GET["blahblah"] elements automatic $blahblah variables.
private message
kapax
groupmastergroupmaster
it is called "Beginning PHP4". and i didnt pay anything, i have e-book, which i have downloaded
private message
BaRa
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
An easier way is to just start coding and whenever you stumble onto a problem use the search engine at linkwww.php.net to find the solution. Make sure you search in the right section, because you can't find anything other than function names in the function list section for example.

If www.php.net can't help you (which almost never happens), you can always use google or ask it over here.

Greetz BaRa
Edited by BaRa on 10.06.2006 15:45:29
private message
Gome
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Are you able to program in any other language?

If you really want to be able to program you should start with something like Java or C#, which is much more advanced. Later on you can fall back to PHP which will be peanuts then. Basically a lot of languages are the same only different syntax and some have less expressive power then others. Of course there are always unique and exotic languages which are totally different but you probably don't want to come close to them unless you are going to study computer science :D.

Anyway, if you really want to learn to program, start with Java (personal preference) or C#, it will give you a stronger base for further exploration in the world of computer programming.

Edited by Gome on 10.06.2006 15:46:12
private message
kapax
groupmastergroupmaster
sadly, so far i only know Pascal, some java script, and our most powerful HTML :D
well, PHP is really not difficult for me at the moment because i see its similar to Pascal, only PHP is more attractive :-)
and, i am really going to study computer science, which i feel attracted about. my only problem is that i got internet not long ago and i got interested in that only after a while. thats why i may seem so unexperienced ;-)
personally, i think i have everything so i could succeed in computer science. i am very self-confident about it :D
private message

Topic: "could you help a PHP beginner?" (page 1 of 2)

1 2 >