Pass Parameter To New Page
With psp, how can I go to another page and pass a parameter to it?
View Complete Forum Thread with Replies
Related Forum Messages:
Pass On A Parameter By Mod-rewritten Url
I am rather new to mod rewrite an trying to pass on a parameter by mod-rewritten url, but somehow I can´t get it to work:This is my .htaccess: RewriteEngine On RewriteRule ^sub/(.*) /sub/index.php?c=$1 What I want to do is that every word in the folder "sub" would be taken as parameter "c" being processed by the index.php in the folde "sub". But somehow I keep getting an internal error while the script itself works. So if I type in: domain.tld/sub/record5 it would not work while on the other hand when I type in domain.tld/sub/index.php?c=record5 it works.
View Replies !
How To Pass An Xml String As A Get Parameter
I want to send an xml string as a get parameter, where the xml is created from a runtime database query. I try to avoid dynamic framesets, but sometimes they're needed: $xml = mysql_stuff($x,$y,$z); echo "<frameset...>"; echo "<frame src=".$PHP_SELF."?xml=".$xml.">"; snip.... That didn't work, so I tried urlencoding various pieces: $xmlstr = urlencode($xml); echo "<frameset .....>"; echo "<frame src=".$PHP_SELF."%3Fxml=".$xmlstr.">" .....then, at the other end of the recursive pipe: $encodedXML = $_GET['xml']; $xml = urldecode($encodedXML); But that causes trouble too. I suppose I could serialize the xml and save it as a session variable. There must be a way to pass XML as a parameter, from one php process to another.
View Replies !
How To Pass Parameter PLACEHOLDER Through URL?
I understand that by using ? and &, we can pass parameter VALUES through URL. However, in my case, THE PARAMETER PLACEHOLDERS need to be passed instead. For example, <input id="myId" type="text" name="myName"> ... The "myName" will have a value through user's input(code is omitted here). Now I need to pass "myName" as a placeholder (not its value) through URL: <A HREF="Another Program.jsp?myParameter=SOMETHING"> What should SOMETHING (above) be replaced with to represent the placeholder myName? I tried $myName and it didn't work.
View Replies !
Put $link In $_SESSION Or Pass As Parameter
I needed to use a link to a mysql database in a function that was a few levels deep in a script, so I had the choice of either passing the $link along through all the parameters or putting it in the $_SESSION data, I ended up going with $_SESSION, but didn't have a lot of justification.Is there any strong reason why you should do one or the other?
View Replies !
How Can I Pass A Parameter Array From PHP To A Javascript Function
I have a Javascript function that validates an specific form. As parameters this function receives an array of elements to be checked. Depending on the form in cause, the array could have variable lenght. I don't know how can i pass a dynamic array on 'onsubmit' event form PHP code to a JavaScript function. I would like to do something like: <script> function Valid_Form(ElementsArray) { alert (ElementsArray[0].value); alert (ElementsArray[1].value); return (true); } </script> .... <?php ... echo "<form method='post' action='?oper=confirm' onSubmit='return Valid_Form(this.elements[0], this.elements[1])'>"; ... ?> But it don't work!
View Replies !
Trying To Pass By Reference To An Optional Function Parameter
I am trying to make a function that takes an optional parameter that gets passed by reference. Here is the first line of my function definition: function funQueryDatabase($strQuery, &$intInsertId = NULL) { I am getting this error: Parse error: parse error, expecting `')'' in c:program fileseasyphp1-8wwwmy_query_database_function.php on line 7 Line 7 is the first line of my function definition (above). Code:
View Replies !
Passing A Parameter From An HTML Page To A PHP Page
I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php???>Pricelist[/url]</li>
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 !
Changing The Variable As You Pass It Through To The 2nd Page
I am using a form to push variables through to another page. In the form, (a drop down), the code is: <select name="1"><option>L</option><option>P</option></select> Now on the second page I could display the P or the L by saying <?php echo $1 ?> which is fine. What I want is, if someone selects P then it prints 1 on the next page and if they select L then it prints 2. Is this possible?
View Replies !
PHP/SQL Pass Value To Field On Linked Page
I have setup an sql table containing project data (job no, description, date and auto-number id) which displays in rows on my main page. Next to each project is a link which a user can click to submit their details to show interest in that particular project. When they click this link they are taken to another page with a contact form, but I need to automatically show the job no of the project they selected in this form. I have successfully got the job no for the 1st record in the table into the field but need to make it dynamic.
View Replies !
How To Pass Data To Linked Page ?
when a user clicks on a hyperlink i want to pass data to linked page. but what i want is that this data should not be visible to user. i mean is there any way that i can pass data except get method when user click on hyper link?
View Replies !
How To Combine And Pass Data In One Page?
I didn't know what to use as a title for this. Here is the scenario: I have a op.reqedit.php page. This page a form where you input data. In this page I have split a MySQL field. It is called MachineTypeOfWork and is split into Replace, Adjusted, REbuild, Inspected and Repair. These all become check boxes for the user. The form submits to op.reqadd.php. In this page I first have a hidden box where I combine all of the above into Type (this works fine, I have unhidden the box to see it). Then I have $MachineTypeofWork = $_GET['Type']; $sql_query = mysql_query("UPDATE results SET (a bunch of fields) MachineTypeOfWork='$MachineTypeofWork' WHERE WorkOrder = '$wo'") or die (mysql_error()); My problem is that it updates all of the fields it should except the MachineTypeOfWork field in MySQL. It actually overwrites what is already there with nothing. What I do not know (I am new) is can I combine the field and pass it to the database in the same page or do I need another page in the background for this?
View Replies !
Pass The Session Variables To A Second Page.
Ive got a problem with our server. I checked it and i cant login to our webmail(horde) and all other sites that requires logging in. So far i think it has something to do with session variables not being written or not being able to pass the session variables to a second page. Error messages: Undefined index: uid Undefined index: sid Here's our server specs: Linux Dedicated server Fedora Core 3 Plesk 7.5.4 PHP 4.3.11 Im not that well versed with handling servers to i dont know were to start.
View Replies !
Radio Button - Pass It To The Next Page
I have a radio buttons form on a page and when I pass it to the next page I want the code below to be able to detrmine which one has been chosen. So if "Currently In Place" has been chosen I want the screen to echo "X" but not the others. if($_POST['myradio'] = "Currently In Place") { $s= "X"; } if($_POST['myradio'] = "Required Essential") { $t = "Y"; } if($_POST['myradio'] = "Required-Recommended") { $u= "Z"; } echo $s,$t,$u;
View Replies !
Pass Variables From One Page To Another Without Using Sessions?
How would I pass variables from one page to another without using sessions? I already have it set up in a very innefficient way, I make a form with hidden variables be submitted and pass the data on, then retrieved with $_POST. However, I want to get away from this messy solution. Is there a way to pass the variables on and be able to recover them in the next page?
View Replies !
Session To Pass A Variable From One Page To The Next
I am using a session to pass a variable from one page to the next. The user makes a selection in the first page and that variable is passed from one page to the next via the session. Once they make their selection on the form on the index page and click submit, they are sent to the homepage where the following code is run: <?php session_start(); $pcode = $promocode; session_register("pcode"); if ($pcode == 'tree'){ $text = 'this is stuff I wanna say' }else if ($pcode == ''){ header('location:blank.php'); }else if ($pcode !== 'tree'){ header('location:invalid.php'); } ?> What I am trying to do is prevent the user from having to reenter the variable when they return to the home page. Right now, it is forcing them to the blank page and asking that they reenter the promocode variable.
View Replies !
How To Get Rec Id And Use Header() To Open New Page And Pass Rec Id
1. After the record is inserted I would like to open page_add.php and pass the record id (there is an auto_increment field in the table called ID) to the new page "page_add.php". I was thinking of using header() to open the new page and passing the id as parameter (i.e. page_add.php?rec_id=what ever) is there a better way to do this? 2. how would I get the record id after I store the new record? 3. Also not sure how to write header() with a variable in it? Code:
View Replies !
How Do I Pass The Users Name To Another Php Page And To The Sql Query?
i have this simple project of member directory in which user enters the detainls like name address age email etc. through a html page then the details are displayed through a php page. now in this page when one clicks on a user name i have to show the details of that user only. how do i pass the users name to another php page and to the sql query?
View Replies !
Pass Variables To Included Page
I have 7 div boxes in my index.php #searchbox inside #leftbox contains a searchform. When a search is submited, index.php reloads and variables are passed. (I checked, this step works) If the search was initiated the reloaded index.php then includes a Search_and_display_script.php in #contentbox But the variables is not passed (or available) to the included Search_and_display_script.php file, thus no results are displayed. I know that The Search_and_display_script.php works fine independently, but not when included in index.php.
View Replies !
How To Pass A Variable For PHP To Retrive From The Page Before?
I was doing some mysql database stuff and I wanted to have a pop up window with some other forms on it. The problem I'm having is that I have no clue how to pass a variable for PHP to retrive from the page before. I know I can do a "GET" method to put the variables in the URL but I don't think you can get that variable with PHP.
View Replies !
How To Pass Current POST Data To Next Page ?
I got 2 php pages, called A.php and B.php. A.php will display all the selected records to the user and ask for confirmation before any attempt to delete. Let say the user click on the submit button, the action of the form is pointed to B.php. So my problem is, how can I pass all the current POST data in A.php to B.php as well ? I need that cauz the POST data in A.php contains the data needed like ID, to perform the deletion. I can manually write a VBScript to transfer the existing data into a query string and transfer it to the next page. However, it's not a POST data in nature. It wil become GET data right ? So what should I do ?
View Replies !
How To Pass Mysql Search Results From One Page To Another
I am creating a website that uses PHP to query a MySql database. upon supplying the PHP script with a given search string and search term, a list of scientific documents with attributes such as author, date, url and revision are returned. Each document also has a unique id number within the database. What I would like to do is create a system whereby user of the site can leave reviews for each particular document, much like the product review system employed at jungle.com. I have got to the stage where the php script outputs a list of results each separated by a horizontal rule and what i would like is to be able to place a button on each record marked submit review, which would then take the user to a form where he or she could leave a review which would placed into a reviews table in the database. However my problem is that i do not understand how to pass the paper id automatically to the form such that the user does not have the inconvenience of having to type into the form. Does anyone have any ideas on how I could solve this problem?
View Replies !
|