Posted by Magnesium on 22:55:00 08-20-2002
have anybody a good php tutorial?
Posted by KaGez on 00:19:00 08-21-2002
http://www.php.net
if you need a tutorial for that.... anyways, if you know C, you almost know PHP. I don't know if it's worth writing php tutorials, but if there are enough requests, I could write one.
(btw, since you've posted this thread 2 times, I've deleted the 2nd one. It was absolutely the same... please only press the "Submit" button once )
[addsig]
Posted by dxprog on 08:01:00 08-21-2002
He must know English.
[addsig]
Posted by Magnesium on 16:34:00 08-21-2002
sry
Posted by Magnesium on 16:39:00 08-21-2002
---
#ypn unable to join channel (address is banned)
----
???
Posted by Magnesium on 18:26:00 08-21-2002
I'm lerning php... and I have a question:
how can I send strings to an other page ???
-----
index.php
-----
";
?-->
----
test.php
----
--------------------------------
???????right???????
--------------------------------
Posted by Magnesium on 18:28:00 08-21-2002
hehe... I have forgotten something...
'm lerning php... and I have a question:
how can I send strings to an other page ???
-----
index.php
-----
echo "
go
";
?-->
----
test.php
----
--------------------------------
???????right???????
--------------------------------
Posted by KaGez on 01:02:00 08-22-2002
no, not right.
if you want to pass variables to a PHP script, you have 2 methods.
1) Using a HTML <form>. This should be used for sending usernames and passwords to a php script. a example form in HTML would looks like this:
<form action="index.php" method="post">
<input type="text" name="var_name">
<select name="data">
<option value="something">Smthn
<option value="another">Another
</select>
<input type="checkbox" value="test">Test checkbox!
<input type="submit" value="send">
</form>
This is quite simple:
All data will go to index.php. (I assume that you know HTML) The first input tag inside the form will send a variable to the script, which will be able to access in the script throught the name $var_name. The select tag will send a "array" to PHP (I assume that you know what a array is). The name of the variable will be $data. $data[0] will contain "something", and $data[1] will contain "another". The checkbox will also send data to the script. The data the checkbox sends will be in the variable $test, and it will contain "on" if the checkbox was checked, "off" if it wasn't.
I've left out some of the <form> things, but that should be easy for you to figure it out since you now know the basics about it
2) for example:
index.php?page=front&title=hello+there
this is also quite simple. you pass the variable $page to index.php, which contains "front". This is the part between the ? and the &. you use the & if you want to pass a further variable to the script. In this case it is called $title in the script, and will contain "hello there". The + will be replaced with a space (aka whitespace). You can do this with as manu variables as you want.
There still is a 3rd method, which is quite same as the 2nd. You pass the variables to the script like in 2), but you use argv instead to read these ariables inside the PHP script. This is rarely used, since it has only to be used when you've disabled thae bahaviour of 2) in your php.ini.
I hope this helped you a little bit as a intro
_________________
I can't go to heaven and I was banned from hell, so I'm stuck HERE!
KaGez
[ This Message was edited by: KaGez on 2002-08-22 01:03 ]