The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

A little help for a script

OldDarkstarAccount

Senior Member
affiliate
bash -> php

In a bash script the information in taken after the following model

#!/bin/sh
read INFO
echo $INFO

How to I do this in a php script ? ( taking the info of the client ? ).
 
do you mean for a PHP script as a shell script to take a variable from console in an interactive way? if so, i don't know - ask on #php on efnet but you can access script shell arguments ($argv) - more help here http://www.phphacks.com/content/view/32/33/
otherwise, if you are talking about the browser and a form submission, PHP can access 2 collections of data:
$_GET and $_POST

say, they submit a form with a field name=foo value=bar to foo.php, it will translate to:
foo.php?foo=bar and be available via $_GET['foo'] with the value of 'bar'.

similarly it can be with method=post and go to $_POST['foo'].
 
Last edited by a moderator:
MI
Back