Unable To Pass Parameters To Php Page After Upgrade From Php3 To Php4
After I tried upgrading my php version from 3 to 4, all my code which passes
parameters between web pages have stopped working. Not sure what the problem
is. Have tried defining the parameters in the accepting php page with a
'$_GET["parameter_name"]; and also a $_REQUEST["parameter_name"]; but with
no luck. Even tried Globals without any luck.
Below is an eg. of what I am trying to do..
View Complete Forum Thread with Replies
Related Forum Messages:
PHP3 And PHP4 Together
I'm a little new to the PHP thing. I want to try to setup my server to handle PHP3 and PHP4 requests easily. e.g. I have some scripts that are PHP3 and want to start learning PHP4. Instead of doing the simple (like anything I do is simple URL ) thing, I am attempting to set up apache to support MySQL, PHP3, PHP4, SSL, ColdFusion, SteelBlue, and maybe even Frontpage. Tell me I'm insane. Now I have read the "Soothingly Seamless" setup from the website, and had it mostly working, until some unforseen circumstances caused me to have to start over. I can set up Apache to use PHP4, MySQL, and SSL, but for those PHP3 scripts, I am a bit lost. Finally, my question. Is there a simple way (using the Sootingly Seamless page as a reference) to add PHP3 into the mix. Any help on this would be great!
View Replies !
PHP3 Or PHP4
I am starting to write some scripts. Now should I wait until PHP4 documentation and tutorials arise and write in PHP4, or should I just do everything in PHP3? I have a book on PHP3 and I want to know if the language has changed enough to make this book invalid. Thanks. Any clear input is appreciated.
View Replies !
.php Or .php3 Or .php4
With the advent of php4, which extension should we use. A lot of php3 pages use the .php3 extension, but by deafault the extension in the apache httpd.conf is .php. Should we just adapt .php4 or use .php to make sure future upgrades don't cause any issues with already existing code. I would welcome any thoughts.
View Replies !
PHP3 Or PHP4 Tag Not Working
I am setting up my own Apache web server. I downloaded PHP4 but the only php tag that works is .php and not .php3 or .php4. Is this something in the Apache conf file?
View Replies !
PHP4 Functions In PHP3
An error in my configuration-file (probably) in PHP4 installed by EasyPHP makes it neccesary to use PHP3 local. And therefore, some functions are unavailable. Who knows a proper function for array_shift and in_array? Somebody gave me something, but it doesn't seem to work very good: <? function in_array($needle,$haystack) {for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++); return ($i!=count($haystack));} function array_shift($array) { $value_from_beginning=$array[0]; for($i=0;$array[$i];$i++) { $array[$i]=$array[$i+1]; } unset( $array[$i] ); return($value_from_beginning); }?>
View Replies !
PHP4/PHP3 Proxy
What I need is a php proxy convertered into php4 form. So basically I need you to convert 2 php proxy scripts, I have, into pure php4 or php3. It is 2 scripts (index.php and index.inc.php) which I will provide an example to below for you to see what your working with....
View Replies !
Upgrade PHP4.3.7RC1 To 4.3.9
I want to upgrade, but can anyone tell me if it is an good idea tot install the newer version on top of the old one? Ore can i aspect than problems whit my configuration?
View Replies !
Error With Streaming Png And A Upgrade To PHP4.3.4
I had a very simple gallery for photos on my site. The gallery was coded by an old friend I don't have contact anymore. I don't know much about PHP, so I used his code and everything was fine until I upgraded my PHP. I wanted to start learning PHP/mySQL so I upgraded from 4.1.2 to 4.3.4, and now the gallery doesn't work any more. I have tried to fix and still am going to, but I have seen some errors in his code that should have caused an errors before but didn't. This doesn't make sense to me. It now creates output like this. notice: notice: warning here is the streamed PNG file. and then it repeats the same notices and warning over again. So what I want to know is there away to get this to work now without fixing the code, as it will take me a while to get good enough to understand and fix it all. I'm still going to try and fix it, it fun to learn, but it sort of suxs that it doesn't work anymore.
View Replies !
Pass Parameters
I have tried to use extract($_POST); to solve my problem. But it still shows error. parse error: parse error, unexpected < . i want to pass username and password from one page to another. my current code for second page where i need to access username and password is: <?php extract($_POST); <?= $_POST['username']?> ?> I found PHP is the most difficult scripting language compared to ASP.
View Replies !
How To Securely Pass Parameters
Im developing an e-commerce app. This application (e-app) wants to submit some data to the money-processing application ($-app) so that it gets the transaction fullfilled. The question is, how can the $-app check that its really the e-app submitting the data, and not a hand-crafted form anywhere else? At first sight, these come to my mind: 1) Check the source's IP adress (Spoofable?) 2) Check out a hash print (Sort of a signature) 3) Maybe some sort of certificate-public-key (ssl?) signing I would thank some experiences about this matter. (Maybe you would like to check out) Validating input's source.
View Replies !
Pass Multiple Parameters On Seperate Lines?
I need to pass several parameters using an include statement. Pressing enter at the end of each to pu it on a seperate line does not work as the parameters do not get passed. Is there a way to pass several parameters using several lines, to avoid horizontal scrolling?
View Replies !
How Does One Get Non-mandatory Function Parameters To Pass By Reference?
The following class method is being rejected by the PHP parser. If I change the method paramaters and allow the objects to be passed as copies, then the parser has no problem. Or, if I pass by reference but set no default value, then the parser has no problems. I've resovled this for now by taking out the "false" default values. But how shall I handle those situations (there are many) where I wish to pass an object by reference but I'm not sure I'll be passing one? In short, how does one get non-mandatory function parameters to pass by reference? ...
View Replies !
PEAR SOAP Pass Function Parameters
I'm very new to pear soap and would appreciate help calling a function on the java web service in order to get this working correctly. The proxy code generation is as follows, (WSDL file at the bottom of this email) class WebService_LDAPAuthGen_LDAPAuthGenSEIPort extends SOAP_Client { function WebService_LDAPAuthGen_LDAPAuthGenSEIPort( $path='http://solldap2:8080/LDAPAuthGen/LDAPAuthGen') { $this->SOAP_Client($path, 0); } function &authenticate() { $result = $this->call('authenticate', $v = null, array('namespace' =>'urn:LDAPAuthGen/wsdl', 'soapaction' => '', 'style' => 'document', 'use' => 'literal')); return $result; } } So I try to call this via pear soap client e.g. require 'SOAP/Client.php' $param = array('String_1' => 'foo', 'String_2' => 'bar', 'String_3' => 'foo1', 'String_4' => 'bar2'); $wsdl = new ....
View Replies !
Unable To Pass The HTTP REFERER From The Site That Is Embeding My SWF To The SWF.
I have a SWF file that I would like to provide as an embed code to other people. I have a list of allowable domains for this SWF file. The problem I am having is that I am unable to pass the HTTP REFERER from the site that is embeding my SWF to the SWF. I have placed a request.php on one server then this file calls another PHP file on another server called loadFlash.php?file=test.swf I use [header('Content-Type: application/x-shockwave-flash');] in the loadFlash.php file and use $_GET to get the name of the flash file being requested. Code:
View Replies !
Pass Objects By Reference (PHP4/5)
When using PHP 4, this: // ex. 1 class A { function A(&$obj) { $this->object =& $obj; // =& not needed? } } is one reference too many: it should be // ex. 2 class A { function A(&$obj) { $this->object = $obj; // = instead of =& } } because $obj is already a reference when it enters the constructor, is that correct? Further question: when I upgrade to PHP 5, should I remove the & in constructor to get the same effect? Objects are automatically passed by reference in PHP 5, did I get that correctly? So the PHP 5 version would be: // ex. 3 class A { function A($obj) { // automatically passed by reference? $this->object = $obj; // but what happens here? } } But what happens in the $this->object = $obj; line in PHP 5? Is $this->obj now a reference to a reference, as in ex. 1, assuming I understood that piece of code correctly? If so, how do I get the ex. 2 behaviour in PHP 5?
View Replies !
Getting Url Parameters From An Included Page
how would i get the url variables from an page included, maybe this will explain it better. if i put this in my foo.php page: <? include("page.php?item=bar"); ?> could i get the value of "item" in page.php by using: $citem = $_GET['item']; or whatever or is there something else i need to do?
View Replies !
Passing Parameters To A Web Page Script
I posted this earlier and it disappeared from the NewsGroup I want to pass two parameters to a simple script running on my web server. The script "parpass.php" looks like this: <?php echo "The total number of parameters passed was: $argc "; echo "The parameters passed were: "; foreach (argv as $val) { echo "$val "; } echo " "; ?> I tried running this script by typing this in my browser window Code:
View Replies !
Disguising A PHP Script And Parameters As A Html Page
I'm not quite sure if the answer to my question lies in the Apache or PHP realm. If I have a php script running on Apache which outputs a JPEG image such as http://domain/get_image.php?id=15&size=thumb can I somehow disguise it as http://domain/image15_thumb.jpg to allow browser caching? I'm assuming the majority of people's browsers don't cache images generated from scripts such as PHP? For this reason I would imagine the solution would have to completely hide the 'real' URL? On a related note how would I 'disguise' http://domain/index.php?page=contact as http://domain/contact.htm to allow indexing of each dynamic page in search engines?
View Replies !
PHP Form Processing With URL Parameters And Forwarding To HTML Page
I felt this query would be relevant to HTML and PHP forums. I am currently modifying a PHP IMAP script which allows the user to view their email via a web browser. I have made use of URL parameters which are passed to the webserver, and processed by the PHP code (better than javascript). No problems so far :) When I have reached a point where I no longer need these parameters, I use PHP header/location forward to reload the HTML form page. If my page was http://www.mysite.com/ foo.html and I was forwarding** to this specific URL (without any ***?myval=????&anotherVal params). When I reload the form**, I keep my URL parameters that were present*** the previous time the form was processed (they are there in the URL_REFERRER). Can someone tell me how to lose the parameters, so I just forward to foo.html. :)
View Replies !
Pass The Variable From 1st Page And Read It With Other Name On 2nd Page
I am new to this and learning slowly, but I was hoping someone could give me some quick advice on how to create a variable on one page and have it passed to another to be read as an ID for a mySQL database. I want to pass the variable "varRevID" from one page and have it read as "reviews_id" on the other. My database is pulling from just the first record and I would liek to designate from the pointing page which record to pull from.
View Replies !
Pass A Value From One Page To Another
I am currently migrating from an asp environment to php and need assistance converting my scripts. I am trying to pass a value from one page to another. with asp, i use the following: First page: <form name="form1" method="post" action="XXX.asp"> <select name="ABC" id="ABC"> <option value="na">a</option> <option value="b">b</option> <option value="c">c</option> <option value="d">d</option> </select> <input type="submit" name="Submit" value="Go"> </form> Second page: named XXX.asp code: <a href="http://www.example.net/click-123-456?SID=<%=request.form("ABC")%>" target="_blank">DEF </a> What PHP code will place the value of the selection (A,B,C, or D) in the <%=request.form("ABC")%>" spot?
View Replies !
How Can I Pass Variable To Next Page?
I have a search page to search the database, the input from user are include 4 items: keywords country catalog date the results are divided into pages by date desc, so there are PREV10 1 2 3 ... NEXT10 to indicate the page number. Then, How can I pass the 4 items and the page number to next page? I don't wont to use urlencode() and urldecode() because there will be long url in IE's address. I try to set the $HTTP_POST_VARS as cookie, so my code:
View Replies !
How To Pass Session Id To Another Page?
I have a script for loggin to a site. My problem is that I want to pass the session Id to another page but I dont know how to do this. what is the correct way to pass another page the session id for security issues? my another page is: pagina_entrada.htm in this page I have the script for checking if it is the real session id if not it is refused the page This is the script in each page belong to site. All pages has this script first. Is tthis correct? Code:
View Replies !
Pass Variable To Another Page
i know i can pass a variable with POST or GET. but i want to do the following: a user enters wrong login credentials, so i redirect the user to error.php. but i also want to pass the message "login credentials not found!". I could do this with: header("location:index?php?page=error&err=wrong login credentials"); but i don't want the error string to be visible. can i do this another way? POST doesn't seem an option to me as there isn't a form involved.
View Replies !
How Do I Pass An Object To Another Page?
I have 1 page with products on it which users add to a shopping cart using a shopping cart class. The class stores the users products into sessions which works great but I need to be able to display the cart contents on my checkout page using my display cart function. Do I need to pass the shopping cart object and if so how do I do it? PHP Code:
View Replies !
Pass An $id Value From One Php Page To A Form
At the moment i am trying to pass an $id value from one php page to a form which then gets inserted into the database. The problem is that the value inserted into the database does not equal the value that it should, it always equals "0". Here's what i've got so far. On the php page that sends the variable to the edit.php page i have the following script: PHP Code:
View Replies !
Pass A Variable In The Url To The Next Page
i am trying to pass a variable in the url to the next page: http://www.xxx.com/xxx.php?at=$price then, on the xxx.php page i would just use the following command to retrieve the variable: $test = $_GET['at']; wouldn't this be correct?
View Replies !
Pass A Variable To A Second Php Page?
I am working on my first multi-page php project, and was wondering how this works. On the very first page I have: <select name="itemtype"> which is given a value of 1, 2, or 3 and passed to the next page by: $itemtype = $_POST['itemtype']; where the value of itemtype is used in a switch statement. I want to use the itemtype variable again, and add it to my database, so the page can remember if the item is a dvd or cd or book. $itemtype = $_POST['itemtype']; Doesn't seem to be working again is there a way to pass this variable?
View Replies !
Pass The Variable Through To Another Page
I am trying to do: Email form gets sent to email.php and then on to thank_you.html. So ... the trouble is ... I lose the variable $green along the way. And what I mean is this: form.html says this: <INPUT NAME="green"> then email.php sends an email and goes here: $redirect_url = 'thank_you.html' But what I want to do is ... IF green is equal to a certain value - I want to display certain text on the thank_you.html page. But, I seem to not have access to $green once I get to thank_you.html. Code:
View Replies !
Trying To Pass An Identification From One Php Page To Another
I am trying to figure out how to pass an identification number that is generated before the user logs into the system (as they select a job that they are applying for) but is needed after to fulfil their initial request. They can search for jobs but they can't apply for them until they log into the system - thus the identification number of the job they are applying for needs to be passed onto the next page as they either log in or register. I need this identification number (originally retreived from a MySQL database) to be passed through possibly upto 3 pages before it reaches its destination. i also need to be able to send it back to the database on the final page. Is this possible? or is there a better way of doing it? if so how would i go about undertaking it?
View Replies !
Pass XID Via A Session Along Each And Every Page
the user sets up the account and adds each subuser as part of his "group". they share an XID inside the database. so user XID = 001 and subuser XID=001 so i know they belong to the same group. I want to be able to pass this XID via a session along each and every page. So one of my functions in my application would be to list all submembers with this XID. when the main user signs in, how can he carry this XID over every single page he visits? (There is no telling when the main user wants to perform the function above) So login would include username and password, but in the background i want the XID to be passed along somehow after login. So obviously the username password and XID would be in the same table. Would i pass information in an array? how does the script know to hit this one table. I guess im having trouble putting 2 and 2 together.
View Replies !
Pass Array To Same Page
im using the followig code where $e is an array: <a href="admincourse.php?addall=addall&month=$month&year=$year&courseid=$courseid&d=$e"> but its not being passed as an array its being passed as some text "array", what is the correct way to sort this?
View Replies !
Pass An Array From One Page To Another
I'm trying to pass an array from one page to another and display it's contents on the next page. This is the code I am using $var1 = $_GET["name"]; foreach($var1 as $value) echo $value; I keep getting this error "Warning: Invalid argument supplied for foreach()in..........."
View Replies !
Pass Variables To Another Page
I have the following line in one of the pages I made: echo("<A HREF=$PHP_SELF?deleterecord=$recordid>" ."Delete this record</A>"."</li>"[smilestopper]); ($recordid is the unique id of a record i have in a mysql table) When I load the page and choose to delete from one of the links the page reloads but the record is not deleted as it should be from the code I have at the beginning of the page. The whole problem, i think, is that the value is not passed when the page is reloaded, which i have seen by adding at the beginning the command echo($deleterecord);.
View Replies !
Pass An Array To The Next Page In A Form
I have an eccomerce site that has a shared secure server this causes problems with my sessions because as soon as you go to the secure server it obviously starts a new session because it is on a different server. Firstly is there a way to stop this. Secondly if not can I easily pass an array to the next page in a form, I don't think this is possible don't all items have to be displayed in the form, each item in the array needs a form field (hidden) in order to pas sit to the next page.
View Replies !
Pass Upload Page Variables
As I sure will become obvious with the asking of this question, I am new to programing.... I have copied and pasted my way to a successful file upload page and have built some rather ugly if elseif loops that read the file and extract the needed data from it. While the data is being parsed from the uploaded file a string variable is being built that holds some details of the process. All of this happens when the user clicks the upload button on the form. Now when all this code is finished running, I ASSUME the page reloads, because my string variable seems to be empty. So, my question is how do I keep this variable so that I can print it to the form when the process is finished?
View Replies !
|