How do I carry over database variables from one page to another?

I have a MySQL database displayed in a table on one page, with a link in each row pointing to a DETAILS.php page where I want to show the end-user all the details of that record or line item in a different format. After I link to the new page, how do I address the variables for "that particular record" clicked on in the 1st page? Will the system automatically knew which record from the table row I linked from?

lesliebrownadobe wrote:
I have a MySQL database displayed in a table on one page, with a link in each row pointing to a DETAILS.php page where I want to show the end-user all the details of that record or line item in a different format. After I link to the new page, how do I address the variables for "that particular record" clicked on in the 1st page? Will the system automatically knew which record from the table row I linked from?
Each record in your database should have a 'unique' identifier (primary key) tying the record to it.
You then pass that 'unique' identifier to the details page in the link which you create using php to loop through each record found in the database, which presumably you have already done.
<a href="details.php?id="<?php echo $row['id']; ?>
On the details page you then use php to get the 'id' of the record passed to the page via the link:
$id = $_GET['id'];
Once you have the id you are in business and can create a mysql query of the database to get the record associated with the id
SELECT * FROM table WHERE id = '$id'
'id' being the 'unique' field in the database that identifies the records and '$id' being the variable passed from the link

Similar Messages

  • How do I move an app icon from one page to another?

    I would like to organize my Ipad2 but can figure out how to move the app icon from one page to another.

    Tap and hold down on an app icon until it wiggles. Then hold down on the icon and drag it about halfway over to the next screen and just hold it there for a second or two and the app will jump to the next page. Do it slowly and just hold the app on the edge of the screen. Don't try to drag it over quickly. It takes a little practice.
    Tap the home button when you are done and the apps will stop wiggling.

  • How come when i copy a color from one page to another, the color looks faded?

    I'm using the same color in a multi-page layout. When i copy a color box from one page to another, the color looks faded on some pages. WHY?! Thanks!

    So i checked the blend spaces - both are CMYK (as this doc will be offset printed). Something really strange is happening! See attach below: the 2 blues (same setup/blend space, color breakdown, etc...) look different! And my client is PICKY! ugh. HELP! Thanks again!

  • How do you pass a variable from one page to another thru a button

    I have a page that has a button that goes to another page and allows the user to create a new record related to the data on the previous page.
    The first page is a master, while the second page is a detail. I need the primary key from the first page to update a column in the detail page.
    How do I get the primary key in the second page and how do in put the data in the correct column?

    Hi Nielsen,
    The master detail form should handle everything for you already...Select all rows in each table but only display the records besides the primary keys. Try creating a new master-detail form with this idea, don't bother trying to change some other page.
    Mike

  • Pass parameter from one page to another

    Hi,
    I have 2 pages:
    - the welcome page with a combo box P101_OLD (list of values) with a submit button wh'os opening the 2nd page with that region source:
    select
    "ID",
    "ID_POSTE",
    "PERIODE_ID",
    "ADMIS",
    "INSCRITS_RAMQ",
    "INSCRITS_AUTRES",
    "ENREGISTRÉS",
    "VENDUS",
    "AUTRES",
    "COMMENTAIRES",
    "DESCRIPTIONOLD",
    "VOLUME"
    from "#OWNER#"."STATISTIQUES"
    where instr(':'||:P101_OLD||':',':'||STATISTIQUES.DESCRIPTIONOLD||':') > 0
    What's wrong ? How to pass a variable from one page to another?
    Thanks

    are you submitting the form once they click on the combo box? or use select list with submit.
    I have a form with a drop down say for names. after selecting a value I have to click the search button (basically it submits the page and redirects to page 2)
    unless we save the state of the combo box, it won't retrieve a value in page 2
    in page 2 all I had to do was refer to the page 1 field name :P3_TEST

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • How to move database objects from one user to another user

    Could someone help how to move database objects from one user to another user
    Thanks in advance

    Thanks a lot for the reply.
    Actually I wanted to know whether there is any command to change the owner ship of the table.
    For ex table1 belongs to user1. can the owner of table1 to be changed to owner2.
    directly using an oracle command. I knew that it can be done using import and export, since the table was 200 million thought the rename command would be faster instead of import and export.
    Thanks Billy for letting me know that it is not possible using oracle query.

  • How to pass a variable from one class to another class?

    Hi,
    Is it possible to pass a variable from one class to another? For e.g., I need the value of int a for calculation purpose in method doB() but I get an error <identifier> expected. What does the error mean? I know, it's a very, very simple question but once I learn this, I promise to remember it forever. Thank you.
    class A {
      int a;
      int doA() {
          a = a + 1;
          return a;
    class B {
      int b;
      A r = new A();
      r.a;  // error: <identifier> expected. What does that mean ?
      int doB() {
         int c = b/a;  // error: operator / cannot be applied to a
    }Thank you!

    elaine_g wrote:
    I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
    class B {
      int b;
      A r = new A();
      r.a;  //syntax error
    }Why? Class definition restricts what you can define within a class to a few things:
    class X {
        Y y = new Y(); //defining a field -- okay
        public X() { //defining a constructor -- okay
        void f() { //defining a method -- okay
    }... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
    This is also illegal syntax:
    int doB() {
          A r = new A();
          r.a;  // error: not a statement
    }Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that.

  • How do I get text to flow from one page to the next in Pages 5?

    How do I get text to flow from one page to the next in Pages 5 with the Maverick system?

    What may be overlooked in Pages v5 is the notion of combining Text Boxes via the Menu > View > Show Arrange Tools. When you select two Text Boxes, an extra panel unfolds at the bottom of the Arrange Tools window. Uncheck one Text Box and this panel abruptly disappears.
    One can achieve text flow effects between Text Boxes differently based on how one positions the Text Box overlap, and choice of effect above. Though not the accustomed flow found in Pages ’09 v4.3, flow does occur. Consider the possibilities of combining a Shape and a Text box to cut an irregular Text box.
    If I create two Text Boxes and position them side by side with outline touching and choose Unite, this creates one larger Text Box and text flows across and down. On the otherhand, if I overlap the upper left corner of a lower Text Box over one above and to the left, then choose Union, pasted text fills the first Text Box and then flows across and down into the other box. Here is a Union example:
    Intersect will leave a small Text Box where the two overlap, so not much value there. Subtract will cut a chunk out of one Text Box that is the size of the overlapping piece of the second Text Box:
    And Intersect will leave an island in the center where the two Text Box overlap, with flow jumping over this bridge.
    Clearly, this is not what we were accustomed to in the past, but with imagination, style, and layout tuning, it does offer alternative Text Box creativity and layout. Of course, there is the option of simply returning to the previous Pages version for true Text Box linking that most will want to use.

  • Moving Variable from one class to another.

    I need to get a Variable from one class to another how would I do this?

    Well this is a very tipical scehario for every enterprise application. You always create logger classes that generate log files for your application, as that is the only way to track errors in your system when its in the production enviorment.
    Just create a simple class that acts as the Logger, and have a method in it that accepts a variable of the type that you are are trying to pass; most commonly a String; but can be overloaded to accept constom classes. e.g.
    class Logger
      public void log(String message)
        writeToFile("< " + new Date() + " > " + message);
      public void log(CustomClass queueEvent)
        log("queue message was: " + queueEvent.getMessage() + " at: " + queueEven.getEventTime());
    }Hope this makes things clearer
    Regards
    Omer

  • Copy variable from one thread to another

    My program requires user to input a java file which contains the run() method.
    In the input file, user can declare variables and use those variables inside the run method. User also need to enter the number of threads to be spawned.
    The problem is how can I construct some method like "copy" which can copy the variable from one thread to another in my program? I can't do that since I don't know the name of the variables that the user inputted.
    I've tried this:
    class helloworld extends thread{
    void run(){
    String a="hello";
    String b="world";
    copy(0,1,a,b)
    class myProgram {
    Class c = Class.forName(fileName);         // file name of user's file     
    Thread t[] = new Thread[p];             // p is number of threads
         for (int i=0; i<p; i++){             // create threads      
                   t[i] = (Thread) c.newInstance();  
                   t.start();
    public void copy(int sourThread, int destThread, String s1, String s2){
    t[sourThread].s1=t[destThread].s2
    But it doesn't work. It said "cannot resolve symbol s1 and s2".
    please help. urgent. Thanks a lot in advance.

    You need to seriously reconsider what you're allowing the user to do. The short answer to your problem is to use a shared, synchronized associative array.
    However, since the user can specify any number of threads, you will have to resolve deadlocks, and the fact that you're asking this question suggests you will have problems doing so until you have read up on threads and shared variables in more detail. (I don't mean to be dismissive. Deadlocks and shared variables have to be customized to the application, i.e., you have to figure out just when each thread will need access to the variable, what kind of access, and when.)
    In the meantime, take a step back and take a look at the big picture.
    From what you've said, I would guess a common example of your application is that I want to be able to read file "foo.dat", uppercase each letter in the file, and write it out to "fooXXX.dat" where XXX reflects the thread number. And specify any number of threads I want.
    Threads would not be the best way to accomplish this. Do this serially.
    Alternatively, I could interpret your problem as in you need to create a main() function that's capable of reading someone else's dot-class file, clone the object and start it. In which case, why do you want to share variables? If the user did his job correctly, then his file will already contain shared variables (or copy them as appropriate). All you have to do is clone the object via the new keyword, then call start() in it.
    You cannot share something when you don't know what you're sharing.
    The third option is that you're doing this as an academic exercise (i.e., homework). Granted, yes, your professor may ask you to do things illogically just to prove they can be done. Unfortunately, we're not supposed to help you in that case. People who read this forum generally try to find logical and efficient ways of doing things.

  • How to move a specific tablespace datafile from one directory to another

    Database: 10.2.0.1
    OS : Generic
    Problem Description : How to move a specific tablespace datafile from one directory to another considering that the database is on Oracle Dataguard setup
    ** Oracle is working on this issue, but in parallel is opening the topic to the Community so that Community members can add their perspective, experience or knowledge. This will further enhance all knowledge bases including My Oracle Support and My Oracle Support Communities **
    Edited by: ram_orcl on 16-Aug-2010 21:21

    Dear ram_orcl,
    Please follow the procedures here;
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1034172
    8.3.4 Renaming a Datafile in the Primary Database
    When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
    The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
       1.
          To rename the datafile in the primary database, take the tablespace offline:
          SQL> ALTER TABLESPACE tbs_4 OFFLINE;
       2.
          Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf
          /disk1/oracle/oradata/payroll/tbs_x.dbf
       3.
          Rename the datafile in the primary database and bring the tablespace back online:
          SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE      2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            3>  TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
          SQL> ALTER TABLESPACE tbs_4 ONLINE;
       4.
          Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
          SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
          SEQUENCE# APP
          8 YES
          9 YES
          10 YES
          11 YES
          4 rows selected.
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
       5.
          Shut down the standby database:
          SQL> SHUTDOWN;
       6.
          Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
       7.
          Start and mount the standby database:
          SQL> STARTUP MOUNT;
       8.
          Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
          SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
       9.
          On the standby database, restart Redo Apply:
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
            2> DISCONNECT FROM SESSION;
    If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
    ORA-00283: recovery session canceled due to errors
    ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
    ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'Hope That Helps.
    Ogan

  • Passing variables from one swf to another

    I am facing problem to pass variable from one swf to another.
    I am using loadMovie to load another swf. how can I pass a variable
    value to another swf. Can anyone help me plz? It is somewhat
    urgent.
    thanx in advance.

    first of all:
    this is the Flash Media Server and your problem is not
    related to FMS....
    second thing related to the "somewhat urgent" :
    we, users on this forum, are not there to do your job... so
    calm down otherwise no people will answer your question. This forum
    is a free support forum that community of Flash developer use to
    learn tricks and to solve problems.
    Possibles solutions:
    If the two swf are seperate you can use LocalConnection to
    establish a connection between different swf.
    If you load a second swf into the first one you can interact
    like a standard movieClip(only if there from the same domain or if
    you a policy file on the other server)
    You can use SetVariable(via Javascript) to modify a root
    variable on the other swf and check with an _root.onEnterFrame to
    see if the variable had changed in the second swf.
    * MovieClipLoader will do a better job, in your specify case,
    than the loadMovie. Use the onLoadInit event to see when the swf is
    really totaly loaded into the first one otherwise you will have
    timing issues.
    My final answer(lol) is the solution 2 with the
    notice(*)

  • How can I move an original Version from one Project to another Project?

    How can I move an original Version from one Project to another Project?

    From the Aperture User Manual:
    To move an image into a different project
    Drag the image [from the Browser] into another project in the Library inspector.

  • How do I move my itunes account from one country to another?

    How do I move my itunes account from one country to another?  I set up my itunes account in the United States and now I live in England.  I would like to transfer my purchases from my US account to my British account and then download them onto my new ipod.  I have uninstalled and reinstalled Itunes and I have updated my Windows 7 operating system.  I have tried to get in touch with apple and the advisor said he could not help me.  Ideas? 

    Before you change the country, note the following:
    - you must use any remaining store credit on your account
    - download all purchased content
    - ensure you have no current rentals(if you do, you'll have to wait for them to expire)
    - provide a new payment(such as a credit or debit card) associated with a valid billing address in the UK or an iTunes Gift Card purchased in the UK
    - content purchased from the iTunes Store is country-specific. If you wish to upgrade any of your iTunes Store content to iTunes Plus, you'll need to do this before you change countries. The content you purchased while your account was set to the previous country will not be eligible for upgrade once you've changed countries.
    - after you change countries, you will no longer receive application update notifications in iTunes for the apps you purchased in your original country. However, you'll still receive update notifications on your iOS device for any applications installed on it. In addition, you'll be able to download previously purchased applications again for free if they are available on your new country's store. You will not be charged and the download will not appear on your Purchased page. If a previously purchased application is not available in your new country, you will not be able to download it again for free.
    - If you have an iTunes Match subscription, you can't change countries until the subscription has expired.
    - If you have purchased a Season Pass, you cannot change the country associated with your account until that season is done airing and the last episode of the season has been added to the iTunes Store.
    Taking the above into consideration, here's how to change your country:
    1. Open iTunes and click Sign In.
    2. Enter your iTunes Store account name and password, then click Account Info.
    3. On the Apple Account Information page, click Change Country or Region.
    4. Enter the updated information and save your changes.

Maybe you are looking for