Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Passing 'var' Via GET And Then Populating Page (mysql)


I have a table with a column of numbers (random):

0000000001
0000000026
0000000059
0000000034

And I would like to link them to go to 1 specific template page. Then once on that page, the number that was clicked gets "posted" to the MySQL Query and the information for the page populated dynamically rather than having to have 4 different pages for each number (that's the way I'm doing it now). Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Populating Form From Database, Then Passing Results To Next Page
I have a multiple select input in a form that's being populated by a row
from my database as such:
<input type="checkbox" name="subm[]" value="$row[ID]">

That part is working fine as I can check the displayed page using View
Source and see that the value is the correct row number from the
database. It is then being submitted on a form by $_POST method to
another page where I want to evaluate the checkboxes and display the
contents of the entire row that corresponds to each value="$row[ID]"
that have been checked. But I can't seem to get it to work. I'm having a
problem passing the selected value. Can someone point me in the right
direction?

$query = ("SELECT * FROM `table`");
$result = mysql_query($query);

print "<p>Data for Selections:";
print "<table border=2><tr><th>You chose:";

foreach ($_POST['subm'] as $value) {
print "<tr><td>";
print "$row[ID];
";
print mysql_field_name($result, 1) . ": " . $row[name]."<br>";
print mysql_field_name($result, 2) . ": " . $row[address]."<br>";
print mysql_field_name($result, 3) . ": " . $row[city]."<br>";
print "</td></tr>";
print "</table>
";
}

if (!isset($_POST['subm'])){
print "<p>No matching entry ";
}

mysql_close();

View Replies !
Populating Page Content From Mysql Db.
First off my db table is orginized in this way:

ImgKey (auto increments)
ImgType (pertaining to the buttons in the gallery)
ImgName (name of image)

When you click a button from the initial gallery page, my plan is to pass a query string to the next page with the appropriate ImgType. On the next page I need to grab all the records in the table with that ImgType. (you can see the next page by clicking the first button) Code:

View Replies !
PHP + MYSQL, Populating Drop Down Box
I am looking to generate a dropdown box from MYSQL data:

db name = h2, table = Working, Column = Home.

View Replies !
Populating Drop Down From MySQL
I am trying to populate a drop down menu of MySQL data using PHP and I have hit a snag. I think its probably something simple that a freah pair of eyes could pick out right away that I am just not seeing...

For some reason only the "firstname" part of the data is populating in the drop down and I can't figure out why. When I try to make changes to the echo lines to correct this, nothing shows up including the "firstname" data. Code:

View Replies !
MySql Menu Populating
My goal is to use a Drop Down Menu that is populated by
the database. The user is then able to select a name from
the Menu that pulls all of the information for a particular
person from the database. Finally, a table is populated
with the information of the selected person.

View Replies !
Populating Array With Mysql Results
I'm returning a result set of one field in a table, and want to populate an array with the results. I can't for the life of me figure out a simple way to do this without using mysql_fetch_array() to cycle through the results, append that to a var, then explode that into a var and pass that. PHP Code:

View Replies !
Populating DHTML Menu From MySQL
I have a client that would like to have drop down menus added to a nav
bar that is generated from MySQL. Is it possible to have a dynamically
driven DHTML menu from MySQL?

View Replies !
Populating Arrays From MySQL Query
I have the following code: http://pastebin.com/746601

The field 'material' in 'is_material' contains multiple values for each
record in 'is_details'. Because of this I have used
'is_material_lookup' as a reference lookup table containing the
'style_code' and 'material_code' which refer to their full details in
the respective tables.

Currently I have got the script outputting all the details and one
material then in the next block of data, repeating the details with a
different material. What I would like to achieve is having 1 block of
data with a list of all materials in that, instead of the repeat, but
sadly I can't know exactly how to do it.

View Replies !
Populating Dropdown With Mysql Entries
I would like to create a combobox in Flash which is populated with mysql data and programmed with php. For example: There are 3 entries in database .ie. apple, bannana, peach. Now these I want in combobox in Flash MX/flash5.

View Replies !
Populating A List/menu From MySQL
is there a way to populate a list, or a menu form using php, and MySQL? Basically i have a list, and i am planing to import 2 variables, id, and name, bouth id and name are variables loaded from MySQL (yes there are multiple id's, and name's) Name would be the label displayed, and the value would be id. Thats what i need. After that i will make a submit button, witch will post the selected id to a different file. How can i achive this? Does anyone hae any samples maybe?

View Replies !
Populating An Excel .csv File Rather As Well As MySQL
I am very new to this and have what may be a ridiculous question. Is there a way to have info populate both the MySQL table and an Excel .csv sheet? I know that I can go into PhpMyadmin and dump the data but this seems to be a bit cumbersome.

View Replies !
Populating Checkboxes From A MySQL Database
what im doing is populating a php variable, and trying to use the result to add either checked or nothing to the value of the checkbox. Any ideas? Code:

View Replies !
Populating A Table With Data From MYSQL
I have a mysql table with the column names like as "id" and "value" and "bizunit". I also have an HTML table that have unique DIV IDs that correspond with the mysql table.

$query = "SELECT value FROM paceReport2 WHERE bizunit = 10"

How do I write a loop statement that will populate each of the cells in the HTML table?

View Replies !
Populating A Drop Down From A MySQL Table
When they click submit, I want the name dropped from "invite" and added to a table "guests" with their answer if they are coming and how many. I know the SQL to make it happen, but I am pretty sketchy about the PHP. Code:

View Replies !
Populating An Html Form With Mysql Data.
What I have is a basic html form I have made consisting of header fields and fileds that will be populated from a mysql database. The brackets are the actual db fields and denote where I want the data to populate. Here is a small example of the form. Code:

View Replies !
Populating Multiple Drop Down Boxes From Mysql Table
Am having a problem with a dynamic, multiple drop down box query. If I run the code with only one select, it populates fine. If I run it with 2 selects then only the first drop down box populates - the second drop down box is empty. Am wondering if I need to put the query into an array and populate the boxes from there. 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 !
Passing Variables From Page To Page
I just need to know how to pass variables from page to page on my form.

View Replies !
Passing Variables From A Page To An ASP Page?
I have a site using a PHP CMS and I need it to use an ASP module from
another site but I would like to use a frame so it looks like it is
still in the same site.

I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).

I created a frame page in the php hosting with a 1px top frame and the
main frame pointing to the asp page but of course the variable is not
being passed.....if I put the ASP connection code on the frameset page
it doesn't recognize it because the hosting is a Unix/PHP hosting
only.

My question to you is:

Can a variable be passed from the php to the ASP webspace using some
other technique?

I just need to have the ASP module showing as if it is in the PHP.

View Replies !
Passing Value To Different Page
i have a page home.php which has a dropdown menu for the user to select an institution and a Go button. once the user selects an option, a new page named institution.php will be opened which will display information about the institution which was selected previously.

i do not want to have different pages for each institution, so that's why i have one page to display the information according to the option selected in home.php. the problem is, when the user selects an option and click Go, the institution.php doesn't show any data from the db about the institution selected, not even the images that i have. can anyone tell me what's wrong? Code:

View Replies !
[HELP PLEASE] Passing Variable To New Page
I am having hard time passing the variable to the next page. May be you can help me. Let me explain:

I am using mySQL database to store information about images (ID, name, author, description, etc). I am pulling some of the information to create this (look at the example here: http://www.gibsonusa.com/test/page/index.php) Now, I want a new window appear when user clicks on the image. I have achieved it with the following script:

echo "<script language="JavaScript">";
echo" function pop1() {";
echo" window.open("info.php?prod_id=$result[0]"); }"; $result[0] is variable that stores id of the image in database
echo "</script>";

I am calling this function in the following manner: echo"<img onclick="pop1();"";

You can see the result if you click on the image. The new page opens up, BUT the id (product_id in this case) value is not passed to the next page correctly. If you click on the first or second image on the first page it shows that the ID is the same for both of them. However if you look at the source code you can see that the ids are assigned correctly. The same thing happens if you click on any image that says “no image available” (I am using different script to generate those). It seems that the script picks up and stores in the memory the value of an ID of the last image generated with the script (I don’t know if that make sense).

Oh, by the way the contents of info.php that I am calling in the script above are as following:

<?
$myid = $_GET['prod_id'];
echo" Product ID: $myid<br>";
?>

What am I doing wrong? Can you help?
Thank you.

View Replies !
Passing JSP Vars To PHP Page
I need to pass 2 variables that are calculated in thru a few JSP pages and I would like to place the amount calculated into a PHP page.

View Replies !
Passing An Image From One Page To The Next.
I want the user to input information, submit it and be able to check it before having it go to the database.This information will include an image.How do I pass the image from the input page to the next page before having it go to the database?

View Replies !
Passing A Variable To A Page
Is it possible to pass a varialble to a page using just PHP/HTML. The object is to create a agenda page, with information comming from MySql, based on the choise of month in the index page in a different frame, i.e. the month is selected in frame 1.

Now i want to sent the choice of the user to a page, to be shown in frame 2, that is created with PHP, and use the variable in the MySql query.I know this can be done using java, but i would like to avoid that.

View Replies !
Passing Result To New Page.
I have a search result with a link which links to the ID# of the record. By clicking on the link I would like the rest of the record displayed. What will my script look like to pull a particular record ID?

View Replies !
Passing Strings To Another Page
when this code sends the category to the next page it only sends part of the information.. ex… if the selection consist of 1 word its fine but if it consists of 2 words it only sends the first word >>>”network card” sends the word “network” and not “network card” and if its “monitor” and since its 1 word its fine..

What am I doing wrong.. I’m kind of new to php and if you could let me know it would be greatly appreciated. I think my confusing is with the format of this line perhaps where the quotes and slashes go, not sure. Other wise this code does work. I can see it in the address field that it separates the selection but need to send the whole thing as 1 word.

<php
echo "<a href="displaylist.php?cmd=".$row["CATEGORY"]."">". $row["CATEGORY"]." (".$row["ENTRIES"].")</A>";
?>

View Replies !
Passing Big Arrays To Another Page
I'm having a little problem on my advanced search system with large amounts of results, when trying to pass them to another page. Tried to use the serialize function but when the results reach a number, for instance, of 300 the link will not handle that. It works for small resultsets.

When user search the database for (example) stores in "New York" we get 256 results.
Now I want to give the user the chance to search on these results, the stores found in the former query that sell "bread", which would take the user to another page called "advanced search for store features".

This to avoid the use of big forms for these advanced searches, where I've created a degree set of search pages (I have about an overall 250 features to search).

The main problem seems to pass the array to the other page when large ammounts of data are set on this array, which I'll call here as $storeIDs. When the results are small, the serialize and unserialize function will do the job. Is there a way of going through this in other manner?

View Replies !
Passing More Than One Variable To The Next Page?
I've got a page with product info on it. The same page also has a recordset of variables.
I've got a button which has been written using php something like:

<? print"<a href="write_review.php?PID=$product_id">img etc...?>

and I've got $product_id = $_GET['PID']; at the top of the page! This passes the product ID to the next page so that I can use it! How would I pass another variable too using the same button? I've tried just adding &title=$product_title, but it doesn't seem to work?
I've already got $product_title = $_GET['title']; at the top of the page under the first one.

View Replies !
Passing An Array From One Page To Another?
Is it possible to pass an array from one PHP window to another? I have a form where some choices are made by checking boxes, a large number of boxes. And the results of the checks are held in an array. I would love to have the resulting query populate a new pop-up JS window, but I cannot figure out how to pass an array.

View Replies !
Passing The Variables To More Than One Page
I have an initial page 'page_one.php' that sends the data to another one - 'page_two.php' using form. It sends a couple of variables collected from the user input. Now....'page_two.php' has header function before any html that is either skipped or executed based on the user selection. If it doesn't come to header everything is fine, but if it does - header redirects 'page_two.php' to 'page_three.php'.

Now, I want to be able to view all the selected variables in 'page_one.php' in my php code in 'page_three.php'. In another words, how do I pass the variables to page_three.php if it's not declared in action='...' located in 'page_one.php'?

View Replies !
Passing A Variable Into A Another Page
I have a list that comes in during a while statement:

Jane
john
pete
..ect

and i have a hyperlink so i can view their stats... and i want to past their name
so i can get it in the next page...but the variable is not comming up:

<a href=info.php?name=$name>".$name."[/url]

this is what I get: http://localhost/mdo_main/info.php?name=

View Replies !
Passing These Values To Next Page!
I can't seem to get these values to pass to the next page, any ideas? I know this is normally simple but i'm lost with it now. Need some fresh eyes: Soil Level should be a number. I can echo it on the page, BUT when i pass it to the next page it's just blank.

PHP Code:

View Replies !
Passing Through A Variable From Url To Page
I have a php landing page and I'm trying to use a tracking code that would let me dynamically pass through part of the url of this page (like the number 6264) to a point on the page, such as in part of a hyperlink that's posted on the page.

Does anyone know if this is possible?

Ideally, I want to be able to access this page using a query string/tracking code that would include a 4-5 character variable that could be anything really, and it would make whatever that variable is, show up at any point on the page through the use of a token. I want to pass this variable through in an affiliate link.

This has gotta be a simple piece of code that does this. Does anyone know off-hand how someone would do this?

View Replies !
Passing Array To Another Page
I want to pass an array to another php page. Now, I know this can be done with SESSION. But I want to pass array something like page.php?arr=$myarray. Is it possible? If yes, please post example.

View Replies !
Passing A Variable To Another Page?
I'm writing a script for advertisers to signup to get a text link on my website. I'm using a verification page, to make sure they've entered in their information correctly.

I need the data to go from signup.php --> verify.php --> complete.php. I'm able to get the data from signup.php --> verify.php with <form method="post" action="verify.php">, but how can I pass normal variables from verify.php --> complete.php?

View Replies !
Passing Value Trough A 3rd Page
I was looking on the web and I can't find what I'm looking for or I don't really understand. Let take the example of the login script. The user enter his user ID and password and then if it match redirect to another page. Now, when he click on a link he would then go to that page, how can I verify is user id and password again on the 3rd page and so on ? I know it's something easy but I'm don't understand this.

View Replies !
Passing Variables From One Page To Another
I need to take a set of variables from a form, pass them to another form, and finally collect all variables submitted into a final form, where it can be submitted. For instance, the first page asks the user which "web package" they like..

they select and go to another page, which says, "You selected the ___ package, now select your favorite design." They select there design, hit continue, and go to the final page that says, "You selected the __package, __design, and it costs $__ dollars (hidden values) Then they hit submit and all that info is sent via email.

View Replies !
Passing A Javascript Value To A New Page
I am needing to make a section in a form that allows for multiple check boxes to be selected and then and most importantly it has to be writen to a database .

basicly I would like to be able to do is one of two things , the preferable is to check which boxes are ticked and then slot them into data1 data2 and data3 in the database
my other alternative and less prefered is to put them all into one field and seperate the values with a / or ,

the script bellow pretty much does what i want except it echo's the responce in an alert when you click the output button what I need this script to do is run the script as I submit the form , and then pass the value's over to the processing page so that I can assign them to a variable and slot em into the database Code:

View Replies !
Passing Values To Next Page
I have a page that allows users to choose from checkboxes, each with text next to the three checkbox options. If users don't choose from one of the checkboxes then i don't want the text to appear on the next page. But if others have been chosen i want them to show. Maybe i need another elseif in the statement. Code:

View Replies !
Passing Info From One Page To Another
I have a dynamically generated list of check boxes with ids email1, email2, up to the end of the list of addresses. This list is then passed to the next page where all the addresses are concatenated and added to a database. At least that's the theory. I can't figure out how to dynamically get all the $_POST[emailx] variables, with x being 1, 2, to the end of the list.

View Replies !
Passing As URL Such As Page?id=100 To A 4 Script
I am passing variable such as page.php?id=100 to a php script. When I run the script with the id hard coded it works. It uses x template and displays information in the database just fine.

It is just that I need to reprode this script times 21 and dont want to have 21 copies of the same script on the server. I need to be able to pass the variable and an id to the script so that I can use one script to do the job.

I will also be using the same form 21 times. I just need the PHP to recognize the difference between the id's I pass to it for each page. Code:

View Replies !
Passing Objects Form One Page To Another
Is it possible to transfer objects derived from a class form one page to
another?

I made 2 testscripts:

person.php
-------------------------------------
<?php

class person {

private $_name;

public function setName($name) {

$this->_name = $name;

}

public function getName() {

return $this->_name;

}

}

$p = new person();

$p->setName("Jim");

$safep = urlencode(serialize($p));

header("Location:person2.php?data=".$safep);

exit;

?>

person2.php
---------------------------------
<?php

class person {

private $_name;

public function setName($name) {

$this->_name = $name;

}

public function getName() {

return $this->_name;

}

}

$x = unserialize(urldecode($_GET['data']));

echo $x->getName();

?>

But this does not work for me....

View Replies !
Array Values Not Passing To Next Page
I have a search form which has list box where in the user could select multiple values and a text box for date field.When the user selects multiple selection, the query works fine and displays according to selection only on the first page, but when they hit the next page the query displays the results for all selection.

I 'm displaying 25 records/page. But it works fine for the date field and the next , previous links display according to the date value. I 'm not sure why the value of the array is not passed. PHP Code:

View Replies !
Passing More Than One Word Variables To Php Page
i wrote a search page for my site (searching through a mysql database) but
when i type in more than one word (eg "item three") in the search field it
gets passed to the page as a single word ("item"). Are there any
workarounds for this? the code is below.( houseproudlancs.co.uk/search.php
)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<!-- background="./images/background.jpg" --> <body bgcolor="#640000">
<?php
$search_for = $_GET['for'];
$search_category = $_GET['category']; global $search_for;
global $search_category;
global $the_items_description;
global $does_contain_text;
?>

<div align=center>
<form action="http://www.houseproudlancs.co.uk/search.php"
method="GET"> <br><table bgcolor="#EBEB96" cellpadding=6>
<tr> <td> </td> </tr> <tr> <td> <div align=center> Search For:
</div></td> <td> <div align=center> Category: </div> </td> </tr>
<tr> <td>
<INPUT name=for value=<?php echo ("$search_for"); ?>>
</td> <td>
<SELECT NAME=category SIZE=1>
<OPTION <?php if ($search_category == "Search All
Categories") { echo ("SELECTED"); } ?>>Search All Categories
<OPTION <?php if ($search_category == "Floral Creations") {
echo ("SELECTED"); }?>>Floral Creations <OPTION <?php if
($search_category == "Decorative Lighting") { echo
("SELECTED"); }?>>Decorative Lighting <OPTION <?php if
($search_category == "Kitchenware & Crockery") { echo
("SELECTED"); }?>>Kitchenware & Crockery <OPTION <?php if
($search_category == "Fancy Goods & Furniture") { echo
("SELECTED"); }?>>Fancy Goods & Furniture
</SELECT>
</td> <td>
<INPUT TYPE=submit VALUE="Search">
</td>
</form>
<tr> <td> </td> </tr>
</table>
</div>

View Replies !
Passing Variable Between Functions On The Same Page
I have a function (below). The part I am confused abbout is the variable $cnt (in bold). I wish to use this variable in another function that is on the same PHP page, how can I pass the $cnt variable onto another function in the same page? I keep gettin the undefind variable message! Code....

View Replies !
Passing Checkbox Values To Another Page
What I want to do is pass multiple checkbox values from a form on an HTML page to another page (Thank you page) where it can be viewed if it was selected (checked). I know I need to "Get" the information from the quiry string after the information has been submitted but I'm lost on how to exactly set this up so it works properly. Code:

View Replies !
Passing A Php Variable When Opening New Page
I am working on a file directory listing and file editor.  I have a index.php file which lists directory contents and a "create new file" link which pops up a new window to create a file within the working directory.  I am popping up that new window with javascript and I'm not sure how to pass the variable containing the working directory as I do that. Code:

View Replies !
Passing Data To Another Page Using $_SESSION's
Is passing information from one page to another page using $_SESSION okay and secure.

Like First name, last name, address, social security number.

... or is there a more secure way of passing the information?

View Replies !
Passing Form Data Through A Page
I'm in the process of creating a new form that stores customer input into a MySQL database. What i'm attempting to do is allow them to fill out their data, and hit 'next' to go on to a file upload form.

Upon completing that form and submitting, all information (including their data from page 1) is posted at the same time (so it's all under the same ID).  What would be the easiest way to do this? Right now my submit file (submitquote.php) contains the following data (all on one page). Code:

View Replies !
Repeatly Passing Objects To The Same Page?
Let say I am trying to get a list of schools, and I provide a form for ONE school/page.

If the user wants to add one more school, he/she can press "add" and it will loop back to the same php page and php script should construct an object "school" based on the data he/she entered in the form and add the object into an array.

If the user has entered all the school infos, he/she can press "done" and the php script should flush the array of "school" objects into a db.

My main question: how can I pass the array of objects back to the same page?

View Replies !
Passing Post Method More Than 1 Page?
can i pass using post to more then 1 page? like method="post" action="welcome.php, stats.php"?

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 !

Copyright © 2005-08 www.BigResource.com, All rights reserved