Re: Looking for your reply

From: Date: Thu, 31 Mar 2011 07:45:20 +0000
Subject: Re: Looking for your reply
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10782@lists.php.net to get a copy of this message
If this question is relevant to any PHP mailing list, it would be the "General user list". See here: http://www.php.net/mailing-lists.php Ben. On 29/03/11 3:50 AM, 200652800@qu.edu.qa wrote:
Hello I'm a senior student in Qatar University, and I REALLY need your help. in our university we do not have any php courses. So for me it's a new programming language. A part of my senior needs to be programmed using php. I went through you tutorial and I really benefit from it. But I'm no stuck in a part, and until now I can not figure out the solution. Now what I need to do in php is to send an http request using the post method. in this request I want to send a string variable. when I read your tutorial I found this code and I think that this is the code that will send the variable from one php file to another one php file: $r = new HttpRequest('http://localhost/form.php', HttpRequest::METH_POST); $r->addPostFields(array('TransferdWord' => $Message )); try {
     echo $r->send()->getBody();
} catch (HttpException $ex) {
     echo $ex;
} and this is the second php file that will receive the variable and print it. <?php $dbhost = 'localhost'; $dbuser = 'root'; print("welcome to this form"); $clientVariable=$_POST['box']; //to print out the data print ($clientVariable); ?> however, I'm not getting something in the second file. Could you please tell me what is wrong with my codes ? please I really need your help. Note: I'm using the wamp server to host my files. Looking for your reply :( Regards, Nada


« previous php.webmaster (#10782) next »