Using a Variable on More than One Page

Hello,
I would like to use the same variable on three pages.  Right now I can only get it to work on two.  The first page has a simple HTML form where the variable is entered.  The second page uses the variable just fine.  I am using AJAX to refer to a third page, and I'm not sure how to use the same variable on the third page.  The variable is called "find."
On the second page, I have this:
$find = strip_tags($find);
$find = trim ($find);
$result=mysql_query("SHOW TABLES FROM sand2 LIKE '%$find%'")
or die(mysql_error());
The second page then has AJAX which points to a third page/URL, and on this third page/URL, I have this:
function getAllVotes($id)
   $votes = array();
   $q = "SELECT * FROM santafe WHERE id = $id";
On the third page, I would like to replace the table "santafe" with the variable "find," the same variable that I use on the second page.  How do I do this?
Thanks in advance,
John

Hi Mark,
The thing is, I am supplying a form for the user.  Once a value for $find is entered, this value will not change if the browser is not closed, even if a new one is entered into the form.
Here is what I have:
On a page called index.php, I have the following form:
<form action="tsearch12.php" method="post">
<label>Enter Value:
<input type="text" name="find" size="55"/>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="Search" />
</label>
</form>
Then, on tsearch12.php, I have this code in the header:
<?php
session_start();
$find = strip_tags($find);
$find = trim ($find);
$_SESSION['find'] = $find;
?>
Then, later on in tsearch12.php, I have this code:
<?
if ($searching =="yes")
if ($find == "")
echo "<p>You forgot to enter a search term";
exit;
mysql_connect("mysqlv3", "username", "database") or die(mysql_error());
mysql_select_db("sand2") or die(mysql_error());
$find = strip_tags($find);
$find = trim ($find);
The page tsearch12.php later makes an AJAX request to a page called votes12.php, which has this in its header:
<?php
session_start();
?>
This code all works perfectly for the first value that the user enters in the form on index.php.  However, when the user returns to index.php and enters a second value into the form, the variable $find does not change to the second value.  How can I change the session to make it so that $find can change when a user returns to the original form and enters in a new value?
Thanks,
John

Similar Messages

  • How to use beans in more than one page

    hello members,
    can somebody tell me how to make beans availabe to more than one page ,i used scope variable as "application"
    in which i set the value of java bean and in that page it show all values of that bean even it modified
    but when redirect to another jsp page it does not show modifided value,it shows its default value
    what shld i use tell me
    following thing that i use in forwarded jsp page
    <jsp:useBean="same id in previous jsp page", class="same class", scope="application"/>
    and then i am using boolean variable which set false default ,but i set it manually though
    setfuction (assume) in original jsp page,but in redirected page it showing it value fasle
    i don't know why
    can somebody (Bean Bond) help me in this problem
    i will very thankfull to you
    plz..................

    My dear friend,
    your scope is wrong. Since you run a JSP page and you want it available everywhere, the only thing that all pages have common is session. So changing your bean scope to session will keep the bean variables and the rest you have on it.
    Try it and let me know.

  • When I read a pdf document using Safari I'm unable to read more than one page of a file. A padlock icon is locked on the tab. Please help.

    When I read a pdf document using Safari on my IPad  I'm unable to read more than one page of a file. A padlock icon is locked on the tab. Please help.

    Hi snoreaustralia,
    It sounds like you just need to associate the PDF filename extension with Acrobat, rather than Preview. Please see this document from the Microsoft Help for instructions on choosing the default program for opening a particular file type (in your case, PDF): Change which programs Windows uses by default - Windows Help
    Best,
    Sara

  • How to use more than one page to design a form-like report???

    Hi
    I am designing a form-like report. and widening the repeating frame to contain all the page or the window like this page:
    Image: !http://up1.m5zn.com/photo/2008/12/21/07/e728mos12.jpg/jpg!
    Now there is no space at the window to complete designing the report!
    How to make the repeating frame to contain more than one page or one window to complete designing the report?

    change Vertical Panels per Page to 2 (or more as needed) for the Main Section of Layout Model.

  • How to handle form with more than one page in struts

    Hai,
    i have more than one page in my struts web apps. each page has a form & i have submit button @ last page. I navigate between these pages using titles. data has to exist when i come back from another page(i.e i am in page1 i have some fields called name & address as textfield, i move to page2 & then i go back to page1 @ that time i should have the name & addess values that i entered previous in the corresponding textfield) & finally when i submit need to get values form all these pages.
    Plz tell me how to do this.

    Hi prasadmca ,
    1.Try to store those value in session variable
    2. or else store those value in DB

  • Why can't I paste more than one page at a time?

    I have a problem with Pages when I try to paste more than one page worth of content at one time.
    In my business I have a form online for clients to fill out. When the clients have finished the form, I copy the form (saved either as a safari document or as a pdf) and then try to paste what I have into Pages. It should flow to fill out four pages, but for some odd reason it only fill the first page of a Pages document, then it gives me a second blank (empty) page. So the document is two pages long, but only the first page has content.
    I know the pasted information is hidden in the document, because if I were to cut (erase) a few lines of content, the pasted information would appear from the bottom of the page to fill the space I just made.
    Why is Pages not making a four page document containing all my pasted information? Why isn't it flowing to fill out as many pages as it takes to show all the information?

    Michele Stapleton wrote:
    I think using Numbers is too complicated because what I want essentially is a text document I can alter.  I take the information they put into my form and repurpose it in a way I find more useful while performing the job. So, I want to be able to take their typed information and move it around. And add some more of my own.
    You may perfectly "their typed information and move it around" in Numbers which behave as the AppleWorks Draw environment.
    Here is the second page in the document which I posted before.
    As you may see, the standard Word Processor features are at work:
    Spell Checker
    Selection…
    I exported my AppleWorks documents in Numbers ones.
    And of course, with the Numbers document open, you may copy pieces of it and paste them in Pages's pages.
    Yvan KOENIG (VALLAURIS, France) jeudi 16 juin 2011 16:44:30
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How to add the rows formatted as table headings, Tables headings are repeated when a table spans more than one page.

    Hi all,
    i am facing problem while generating Test Result word document after successful execution of TestStand.
    The Problem is :
    i want to add rows Formatted as table headings, table headings are repeated when a table spans more than one page(marked as Red).
    Example:
    Page  No. 1
    |     Test case Number  |  Test Step number      |
    |      100                         |            100                   |
    Page  No. 2
    |     Test case Number  |  Test Step number      |
    |      200                         |            300                   |
    Test Result word document should generate with Table headings(marked as Red) in every pages of the document, but i am not getting as per above example.
    Please through light on this.
    Regards,
    Susa.

    Hi Santiago,
    Thank you very much for your valuable reply.
    i want to generate MS-word report for TestStand after successful testing using MS-word2000.
    Test report contains Actual values, Expected values and Pass/Fail status.
    In my program i have customized all  fields i can able to generate test report which contains Verification engineer name , test mode, test date, start time, end time Actual values, Expected values and Pass/Fail status.etc....
    To put all values of test case number, Test step number, Actual values, Expected values and Pass/Fail status in to table for each time, i will
    insert a row into table every time values arrives, once the table exceedes its page size it moves to the next page, next page should start with table row header  but it start with  values of above said parameters.
    so i'm not able to repeat table row header for each page.
    Please find the attached file for your reference.
    Attched file expected.doc  :   This file contains what i wanted to generate MS-word report. Here table row header "Test Case Number and Test Step Number " is repeated in second page.
    Attached file Actual output from source code.doc   :  This report generated from the source code. Here table row header "Test Case Number and Test Step Number" is not repeated in second page.
    Do you know any property to set "repeat as header row at the top of each page" using MS-word ActiveX in CVI/Labwindows.
    i think this information is sufficient for you,
    Still if you need some information please ask me.
    Thanks
    Susa.
    Attachments:
    Actual output from source code.doc ‏25 KB
    expected.doc ‏26 KB

  • How to go back more than one page at a time?

    I'm pretty sure there used to be a drop-down arrow by the back/fwd buttons, so you could go back more than one page by selecting it. Yeah? Where did it go?

    You can either right-click on the back/forward buttons or hold down the left mouse button until the list appears.

  • How do you fax more than one page at a time?

    How do you fax more than one page using the phone?

    Hello @spirittoo, 
    I am not quite sure what you mean.
    Are you using a third party app to send faxes from a cell phone?
    In case you are having an actual fax issue, I have included the following links.
    Send a Fax from the Scanner Glass or the Automatic Document Feeder
    Fax Sending Fails Intermittently or Fails for Only One Recipient
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • Cannot work on more than one page and menu shifting problems

    I downloaded Muse CC 2014 when it first came out, and now I find myself no longer able to edit more than one page without having to completely shut down the application and start it again. Here's what happens:
    I open a page to edit, and then anything else I try to double click on (or right click and choose open page) does absolutely nothing. Any ideas why this is occurring?
    Also, I've noticed a strange phenomenon where my menu has completely shifted its menu contents - pushing everything down. Nothing I did - wondering why this is happening. This has pretty much rendered Muse unusable to me and I am becoming more and more frustrated since I'm paying good money for this....please help.
    Here's a screenshot of the messed up menu (all text should be located in between the green dots and not so spread out):
    Also, if I try to create a border around a text box with just the bottom border showing (i.e. the other 3 sides are set to 0), that bottom border also shifts down as if the text container has suddenly expanded.
    This happens with both my Macbook Air and my MacPro.
    Thanks in advance for any help. I'm kind of at my wit's end....I really need to be able to update my website as this is the face of my business.
    -Kristine

    You could look at using a template.  Create your master template, create editable and non-editable regions, then use this template create all the child pages.  When you need to make a change to the menu, make it in the template and the changes will flow down to all the pages created from the template.
    Using DW Templates:
    http://www.adobe.com/devnet/dreamweaver/templates.html
    http://www.adobe.com/devnet/dreamweaver/articles/dw_templates.html
    The other option would be to create the Navigation item as a server side include...
    More about this:
    http://kb2.adobe.com/cps/143/tn_14380.html
    http://www.entheosweb.com/website_design/server_side_includes.asp
    Difference between using a template and server side includes.
    When you make a change to a template, you need to re-upload all the pages created from the template.
    Using a SSI, you make the change in the ssi file,  upload it and all pages are automatically updated.
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/
    http://twitter.com/nadiap

  • Why can't I print more than one page?

    I'm pring a lafge text:
    <af:inputText id="it1" value="#{main_bean.resp}" readOnly="true"
    simple="true" rows="#{main_bean.kvitRows}" styleClass="AFStretchWidth"
    visible="true"/>
    That is I use one af:inputText with many rows.
    To send it for pring I use JavaScript.
    <af:resource type="javascript" >
    function printPage(evt){
    window.print();
    evt.cancel();
    window.close();
    </af:resource>
    When printing it clips the text. If the text is more than one page it print only one page. I need to continue printing on the next pages (not to clip). When printing othe web-pages it distributes it onto several paper pages.

    Michele Stapleton wrote:
    I think using Numbers is too complicated because what I want essentially is a text document I can alter.  I take the information they put into my form and repurpose it in a way I find more useful while performing the job. So, I want to be able to take their typed information and move it around. And add some more of my own.
    You may perfectly "their typed information and move it around" in Numbers which behave as the AppleWorks Draw environment.
    Here is the second page in the document which I posted before.
    As you may see, the standard Word Processor features are at work:
    Spell Checker
    Selection…
    I exported my AppleWorks documents in Numbers ones.
    And of course, with the Numbers document open, you may copy pieces of it and paste them in Pages's pages.
    Yvan KOENIG (VALLAURIS, France) jeudi 16 juin 2011 16:44:30
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Can I open more than one Pages document at a time with the IOS app?

    This sounds crazy, but I can't find how to open more than one Pages document at the same time when using the Pages app on IOS.
    It's easy on the Mac, but on my iPad? Can't seem to do it!
    I'm working on a project where I'm writing one document, but having to frequently cross-refer to another. Having to continually open and close each document, one at a time, on my iPad is driving me mad!
    Am I missing something really obvious? Can anyone help please?

    Many thanks, that's really useful. I've saved the document I'm referring to as a PDF and can now work exactly as you described.
    As you say, it's not elegant, but it does work
    Just need to ensure my fingertips are very dry, as I fear any slight 'catching' with a four finger swipe and my iPad will fly across the room / train / office 

  • Problem with printing more than one page (ghostscript broken?)

    Hello,
    since one of the last package updates I have problems with printing more than one page. The print problems occurs as well with pdf files as well with printing websites. I use an actual KDE system with commercial turboprint printer driver. The first page always prints fine, but all consecutive pages are corrupted.  As from a similar problem some months ago, I assume a broken ghostscript package. I tried to downgrade ghostscript to check that, but I get depency problems:
    root@arch32 dieter]# ls -l /var/cache/pacman/pkg/ghostscript-*
    -rw-r--r-- 1 root root  9906288 21. Mär 2010  /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    -rw-r--r-- 1 root root 11402624  8. Okt 22:44 /var/cache/pacman/pkg/ghostscript-9.00-1-i686.pkg.tar.xz
    [root@arch32 dieter]# pacman -U /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    Löse Abhängigkeiten auf...
    Suche nach Zwischen-Konflikten...
    Fehler: Konnte den Vorgang (Kann Abhängigkeiten nicht erfüllen) nicht vorbereiten
    :: libspectre: benötigt ghostscript>=9.00
    [root@arch32 dieter]#
    Anyone else having printing problems or a solution for my problem?
    Thanks, Dieter

    This may not be related but I had a problem printing a pdf today whereby the second page got corrupted. The same pdf had printed fine several months ago. I realised that (long story) for some reason I had switched drivers (HP printer) from hpijs to hpcups. I installed the printer again as a "new" printer using the hpijs driver and it printed properly this time.
    So it may be that the bug causes issues with some drivers. You could try an alternative driver for the printer as temporary workaround?

  • SMARTFORM: how to create 3 copy (each copy can print more than one page)

    SMARTFORM: how to create 3 copy (each copy can print more than one page)
    Hello everyone.
    my user want to have form that print 3 copy.
    such as 1 copy description = master,  2 copy description = copy 1 ,3 copy description = copy 2.
    so i create 3 page . I copy from page 1.
    and in each page there is main window which can have data more than 1 page.(such as have a lot of sale data ,it's take 2 page for show output .so it's take 2 page in each copy)
    please help me.
    how to set page and window in each page for print 3 copy and each page can have main window that print more than 1 page

    Hello Vinit.
    thank you very much for your help.
    could you help me more please.
    in below code
      DO NAST_ANZAL TIMES.
    l_counter = l_counter + 1.  " << pass this to FM and use for the TEXT to print
    CALL FUNCTION LF_FM_NAME
               EXPORTING
                         COUNTER = l_COUNTER   " USE this to derive the text into PRINTOUT
    enddo.
    Now i out of office .so i cannot test.
    where do i set NAST_ANZAL for 3 ?
    can i input ?
    NAST_ANZAL = 3.
      DO NAST_ANZAL TIMES.
    l_counter = l_counter + 1.  " << pass this to FM and use for the TEXT to print
    CALL FUNCTION LF_FM_NAME
               EXPORTING
                         COUNTER = l_COUNTER   " USE this to derive the text into PRINTOUT
    enddo.
    Edited by: dittaporn nanasilp on Mar 12, 2011 3:33 PM

  • Can I split a spreadsheet table over more than one page?

    Is is possible to split a table so that data can be linked from page to page?
    I would like to have a table with formulas on page 2 referencing data from another linked table on page 1 of a Pages document.
    I know this used to be possible in Appleworks. In fact I have some old Appleworks docs like this, but when I try to open them in Pages they get scrambled. Any ideas anybody?

    Thank you both for your help. It sounds as though the answer is "No, this can't be done"
    Neither of the 2 options suggested quite fit the bill as my document is a text document report with embedded tables, which do need to refer to each other across more than one page, but still needs to be well laid out for printing and easy reading by others. It seems strange that something which was easy to achieve in Appleworks should be impossible in iWorks, since I thought this was meant to be the replacement program after Apple stopped developing Appleworks.

Maybe you are looking for

  • Authorization Objects for pricing conditions in Sales Order

    Hi All, In transaction VA03, we should restrict some users not to see pricing conditions tab in header and item level and net value on overview screen. Is there anyone who knows how to do it? I wii be very glad if you help me. Best Regards.

  • SQL query or function...

    Hi everyone,   Please help me to clarify this question I have a "patient" table and a "address" table.And each patient has differnt types of addresses like PMI,Mailing and default address i need to pick patient address in the order of preference (PMI

  • Help on resizing text boxes and general image techniques

    Using CS2. I have two basic questions.  One has to do with getting the best vector images (with text) that I can for placement in InDesign documents.  The other has to do with the specifics of working with text boxes in FW. The easiest way for me to

  • Movies and videos not appearing on iPhone.

    I have an odd problem with movies (both those made by me and those purchased via iTunes) not appearing on my iPhone 3GS after syncing, even though they used to. All of the options in iTunes are set correctly for syncing. The strange thing is this: I

  • In design to pdf/x-1a:2001 embedded fonts

    Hello Everyone, I was asked by a printed to export my cs2 indesign file as a pdf/x-1a:2001 file with embedded fonts. The document just came back stating that the font on page 27 is not embedded. The same font is used through out the document. When I