Author | Post | ||
kapax![]() ![]() |
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 ![]() |
||
![]() |
|
||
BaRa![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
You need $_GET["blahblahblah"]; etc.... Check this page: ![]() ![]() |
||
Edited by BaRa on 10.06.2006 15:40:21 | |||
![]() |
|
||
kapax![]() ![]() |
umm yeah, when i added $Author = $_GET["Author"];, it started working... why those people are writing book if they don't even know PHP ![]() thank you ![]() |
||
![]() |
|
||
BaRa![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Which book is it, and how much did you pay for it? BaRa |
||
![]() |
|
||
sniperkid![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
for security (if you start to use it to call stuff from db) you should use $author = strip_tags($_GET['Author']); |
||
![]() |
|
||
Gome![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
has todo with magic variables i believe.. some settings in php make all the _GET["blahblah"] elements automatic $blahblah variables. |
||
![]() |
|
||
kapax![]() ![]() |
it is called "Beginning PHP4". and i didnt pay anything, i have e-book, which i have downloaded |
||
![]() |
|
||
BaRa![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
An easier way is to just start coding and whenever you stumble onto a problem use the search engine at ![]() 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 | |||
![]() |
|
||
Gome![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 ![]() 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 | |||
![]() |
|
||
kapax![]() ![]() |
sadly, so far i only know Pascal, some java script, and our most powerful HTML ![]() 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 ![]() |
||
![]() |
|