PHP - if go to one page, else go to another?!?

I have an if, else statement and I want to go to one page if and another page else.  I can't seem to get it to go the page.  It goes nowhere.  Can someone give me a sample php code how to do this?  Thanks!

Rick4209 wrote:
I have an if, else statement and I want to go to one page if and another page else.  I can't seem to get it to go the page.  It goes nowhere.  Can someone give me a sample php code how to do this?  Thanks!
if (isset($_SESSION['MM_Username'])) {
  header ('Location: http://example.com/loggedin.php');
  exit;
} else {
  header ('Location: http://example.com/login.php');
  exit;
I suspect if you're going nowhere, it's because there is output before the call to header. For an explanation, see http://kb2.adobe.com/community/publishing/505/cpsid_50572.html.

Similar Messages

  • How do I copy and paste from one page or file to another page or file - on the same screen?

    How do I copy and paste from one page or file to another - on the same screen?

      Open both of your images in the Editor. Click on the image you want to copy and press Ctrtl+A (select all) followed by Ctrl+C (copy) then click the tab for your other image and press Ctrl+V (paste)
    Alternatively click on your background image then simply drag the second image from the photo/project bin and drop it into the main editor workspace on top of the background image. Use the move tool to position and the corner handles of the bounding box to scale.

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • How to create a text field (multi-line) that starts on one pages but finishes on another?

    Hi,
    I would like to create a multiline text field that the field starts on one pages but finishes on another?
    Here is an example of what I want. The text starts in the top of the box (1st box) and would continue in the bottom box (2nd box).
    I have Adobe Acrobat X (version 10.1.1) on Windows 7. I know I could use Live Cycle to create an expandable but I need to import this form to Adobe Form Central after therefore Live Cycle isn't an option.
    Thanks in advance for everyone's help!

    Hi,
    I found a possible solution to my question which is working OK with form central (http://forums.adobe.com/thread/303650)
    Here are the limitation of that option (that I found out so far):
    it cuts in the middle of the word you are writting when switching to the next box
    you can't copy and paste a long text
    if you remove text from the first box i won't move text from the second box back up
    you can't go back with your cursor from the second box to the first (e.g. to edit you text)
    Any other ideas of how I can get that done?
    Thank you!

  • How to pull content from div on one page to div on another page

    Hi all,
    I would like to pull content from the divs on page to divs on another page (so that I only have to update information on one page).
    Could anybody give me a tip on where to read about this/how to do this? I am not expecting the final answer, just a clue on where to start looking for how to get startet.
    Thanks in advance for any answers.
    Best regards,
    Ivan
    www.colombiareiser.no

    Try reading on DW Spry html data sets. The Spry HTML data set allows users to use standard HTML tables and other structured markup as a data source.
    http://labs.adobe.com/technologies/spry/articles/html_dataset/index.html
    http://labs.adobe.com/technologies/spry/docs.html
    Regards,
    Vinay

  • Superimpose One Page On Top Of Another

    I am trying to create a chart that is about the size of a business card and put my information on the back of the business card. I have gotten as far as fitting six of my charts (business card size) on one sheet in Pages 09 and my information six times also (business card size) on another sheet in Pages 09. I want to superimpose one sheet on top of another so that my chart and info will LINEUP WITH EACH OTHER so I can print on both sides of a sheet of paper and then laminate the sheet of paper and then cut each individual card out. If you understand my problem please respond.
    Thank you
    Mike

    View > Show Rulers. 
    With one of your graphis objects selected, Drag Guides onto your document from the Rulers to where you need them. They won't print, but if they distract you, you can delete them once they've served their purpose of helping you to line things up.
    Jerry

  • How to pass selection from one page to form in another?

    Hi all,
    I have an "Events" page that is linked to an "RSVP" form page. On the events page, there are links under each listed event that say "RSVP for this event" that point to the RSVP page.
    The RSVP page is a form where you enter details and choose the event you are RSVPing for in a drop down menu (populated using a recordset because this all needs to be tied into an admin section of the site)
    How can I click on the RSVP for this event link and then have it choose the right event in the menu without having to remember what event and manually doing it yourself? For example, I want to go to event 2, I click the link to RSVP and in the drop down, event 2 is already shown as the first selection.
    I should mention that I used a Nextensio form for the RSVP page and manually built the Events page with a repeat recordset SB.
    Thanks

    Hi John,
    if you switch to Code View, you´ll usually see something like:
    ...following the option´s value attribute.
    Please try with changing this example to:
    ...and don´t forget to backup the original page ;-)
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Spry Submenus won't appear on one page, but they will another

    I have used Spry menu bars on sites before, but this is the
    first time I have had a problem like this. I make the spry menu bar
    on its own page and then use it as an include in a div tag on my
    site. When I preview the Spry Menu Bar in its own page, it works
    fine, and submenus work also. But when I have it in the page,
    everything works except the submenus will not come out. Any ideas?
    I attached the spry menu bar code (which works on its own), and my
    own page, where the spry is not working.

    Hi Rustyintegrale,
    A couple of questions...
    1. Does the unit immediately kernel panic when power from the bus hits the drive?
    2. Does it happen in multiple users?
    3. If you startup, interrupt the boot process and boot to the startup manager (by holding option on startup) and then plugin the SuperDrive does it kernel panic there as well?
    When a peripheral causes a unit to go into this state, there's little that can be done to troubleshoot from a software perspective. Especially if your answer to all three questions above was "yes." You can certainly try resetting the PRAM & SMC, to see if there is any change. But, I think the next best step might be to bring the machine and this optical drive to see a qualified technician.

  • Why can't I link one Pages document to another Pages document?

    You'd think this would be a basic functionality in Pages: to be able to create a hyperlink in one Pages document that opens another Pages document.
    Currently I'm using iWork 2008, and I can't do this.
    Can I do it in iWork 2009?
    Until I can, iWork, in my mind, will be "iCan'tWorkTheWayiNeedTo".

    Tom in London wrote:
    right- so I can stop hunting for the "make coffee" feature in iWork 2008
    seriously though - features that were available in AppleWorks, I foolishly thought would also be available in iWork.
    I perfectly agree with the used adjective.
    Why would Pages offer the same features than AppleWorks ?
    Different teams made different choices.
    So I'll wait for Apple to do this. I'm not going to spend £60 for iWork 2009 just so as to be able to link to other Pages documents.
    I wrote several times that, as we are in october, it would be a good idea to wait until end of january 2010. Often it's the date of major upgrade delivery.
    Yvan KOENIG (VALLAURIS, France) vendredi 2 octobre 2009 12:35:09

  • When I use Firefox, if I want to move from one page to another, I get this: "Are you sure you want to navigate away from this page? Press OK to continue, or Cancel to stay on the current page.", OK doesn't always take me to where I wanted to go.

    Anytime I want to click on one page to move to another I get this question. Most of the time, it doesn't take me anywhere. I cleared everything. It didn't make a difference.

    This issue can be caused gadgets on the Facebook page.<br />
    You will have to check that out by removing each of them until you find the culprit.<br />
    If you added or updated gadgets recently than start with those.<br />
    See:
    * [[Troubleshooting extensions and themes]]

  • Officejet 6500 pause after one page

    When I try to print on may iMac and Officejet6500 connected by wire,
    the printer print just one page.
    To print another one, I have to turn off the printer and turn on again.
    Than, sometimes it prints another page.

    Hi @mgev ,
    I see that you are having issues printing on the Mac using a USB connection. I will do my best to assist you with this issue.
    What operating system are you running on the Mac?  Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    Make sure the printer is connected directly to a wall outlet and the USB cable is connected directly to the computer. The USB cable shouldn't be longer then 6 feet. Try another USB cable. Try another USB port on the computer.
    If you are still having issues continue with the steps listed below please.
    Repair the Disk Permissions on the Mac:
    Close all applications.
    On the Apple menu bar, click Go, click Applications and then click Utilities.
    Double-click Disk Utility.
    Highlight your hard drive/partition on the left.
    Click Verify and then Repair Disk Permissions.
    Restart the computer..
    Reset the Printing System:
    Note: This will remove all printers in the print and Fax/Scan, any printer removed can be re-added later by clicking the plus (+) symbol.
    Click the Apple icon and then click System Preferences.
    Click Printers & Scanners.
    Right-click (or Ctrl +click) in the left white side panel, then click Reset printing system.
    Click OK to confirm the reset.
    Type the correct Name and Password.
    Click OK to reset the printing system.
    Then click the + sign to add the driver, highlight the printer. (you might have to click the drop down to select the printer's name) Then click on the Add button.
    Try printing again.
    If you need further assistance, just let me know.
    Have a wonderful day!
    Thank You.
    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!
    Gemini02
    I work on behalf of HP

  • How do I compensate for only one ADDT ' tNG_config.inc.php file with many Registration pages to build?

    My dynamic site has a lot of different languages funneled into one website, using various cookies, url params, php includes, etc. all to obtain similar info in different languages. Thank you David Powers.
    It is working really well and now I’ve come to the Registration section. Okay, so registration isn’t all that hard; I could do most of it with the standard Dreamweaver set of tools. Alas, I really like much of what ADDT has to offer with welcome email messages and activation and such.
    Here’s the setup: Obviously, with many different language people, I have many different databases for them. I did that becuase we’re expecting a big audience and I really don’t want to have all those different language names in the same table. Furthermore, these tables, whereby the students will login, will also contain a lot of information about their work so again, don’t want to have one massive table. I’ve divvied them up into tables by language and I’m using those tables to keep track of them and their work.
    I want to use ADDT’s User Registration Wizard and I have looked at all the neat stuff in the Control Panel/Login Settings.
    Here’s my situation: I notice that when I’m done with the configuring of one of the registration pages, I’m asked if I want to upload the tNG_config.inc.php page and that it has changed since the last upload. I saved a copy of the _config.inc.php and did a new registration form with the same info and when done, I compared the two _config.inc.php files. As one would guess, there is a small difference in the Connection string to the databases  $tNG_login_config["connexction"] = "connString_Ital_db".
    My problem is that I have 13 of these registration pages to do but ADDT only has the one tNG_config.inc.php. That’ll work great for the one with which it is associated, but the others will obviously break. I’ve looked through the code in the Registration pages, to find the ADDT link to the tNG_config.inc.php file hoping to rename it Italian, Spanish, etc, but the name of the file does not appear in the Registration page.  I realize that ADDT Control panel is designed for use on one site, and can then be used on others, with the changes etc. But my site seems a little unique since so many sites are actually in one.
    Has anyone whipped this problem before? I just don’t understand why there is no link in the head code of the Registration page to let me change it and to create more config files with different names. Thanks for you help!
    [Moved by moderator to appropriate forum]

    Hi Brian,
    I just tried to check all of ADDT´s "includes" files for any internal references (read: "require" or "require_once" statements) to the file "tNG_config.inc.php". So far I can only see this file referenced in the file "tNG.inc.php" (within the "$KT_tNG_uploadFileList1" array).
    So what could this mean ? Maybe you´ll have to make copies of the the original "tNG.inc.php" as well and save them as, say, "tNG.inc_ital.php" file plus make sure that these copies internally point to a different "tNG_config_ital.inc.php" file -- because it´s always the first mentioned file which gets referenced from e.g. an ADDT login page (see the "Load the tNG classes" - part)
    I want to use ADDT’s User Registration Wizard and I have looked at all the neat stuff in the Control Panel/Login Settings
    The Control Panel will always update the main "tNG_config.inc.php" file, so any further modifications will have to become manually applied to the custom files you´re creating.
    Cheers,
    Günter

  • HT1222 I just wish we had a "backwards" half circle to hit when we need to go back one page.  Does anyone else feel the same way?  How did I find this page anyway?

    I just wish we had a "backwards" half circle to hit when we need to go back one page.  Does anyone else feel the same way?  How did I find this page anyway?

    how about you just swipe from left to right.  works for me.

  • Update multiple records on one page php/mysql

    Hi folks,
    I am trying to adapt a page to offer the option to update multiple records on one page.
    The intention is to edit FAQ categories which are contained in a table with just two fields - the category and an id.
    The page lists each categories in a form with a submit button which is then repeated for each record in the recordset.
    Unfortunately my plan didn't work and only the first record updates as intended.
    Can anyone suggest how I can make it work?
    Here's the code I have so far.
    ************** The Update Code *****************
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if (!isset($mm_abort_edit) || !$mm_abort_edit) {
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE faq_categories SET category=%s WHERE id=%s",
                           GetSQLValueString($_POST['category'], "text"),
                           GetSQLValueString($_POST['id'], "int"));
      mysql_select_db($database_con_mysite, $con_mysite);
      $Result1 = mysql_query($updateSQL, $con_mysite) or die(mysql_error());
      $updateGoTo = "faq-category-edit.php
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    ************** Update Code Ends *****************
    ************** The Form *****************
    <form name="frm_editcategory" id="frm_editcategory" method="POST" action="<?php echo $editFormAction; ?>">
      <?php do { ?>
    <fieldset>
              <input name="id" type="hidden" value="<?php echo $row_rs_faqcategory['id']; ?>" />
              <input name="category" type="text" class="formrightcolumn"  value="<?php echo $row_rs_faqcategory['category']; ?>" />
              <input name="save" type="submit" class="submitbutton" id="save" value="save" />
    </fieldset>
              <input type="hidden" name="MM_update" value="form1" />
       <?php } while ($row_rs_faqcategory = mysql_fetch_assoc($rs_faqcategory)); ?>
    </form>
    ************** The Form Ends *****************
    Cheers
    Dave

    What does debugging tell you? What's the value of each of the variables? Did you try using regular echo statements to monitor what's going on? That's what I always do whenever I am stuck in my PHP coding.

  • Created a one page index.php site with dynamic driven menu but have to click thrice before it popula

    Created a one page index.php site with dynamic driven menu but have to click thrice before it populates the content menu
    it has no problem getting the menu information but seems to forget that the content needs to load on first go ie for the Home page
    anyone with any help would be great

    Hey J.S,
    Do you think its a bad idea to have Database admin over them web? How could i make my db admin into a program to run on a certain computer. i.e on the car breaker yard where there is no dreamweaver.
    Thanks J.S

Maybe you are looking for

  • Aperture 3 won't recognize Aperture 2 library after HD crash.

    I have a MacBookPro 17 inch, purchased last year. My HD was showing some signs of slowing down, so I attempted to install Snow Leopard to see if that would speed things up. My computer crashed on installation (maybe dead RAM or HD?). I had already ba

  • Mac pro 5.1  dual monitor calibration

    hy everyone hope your having a nice day i am working on a macpro 5.1 station with ATI Radeon 5870 video card  and 2x 27 " inch led display from apple and i would like to know how to adjust the color of the led displays and color match them  the reaso

  • Read data with spreadsheet in different formats

    Hi all, I have to read these data table using the VI Read From Spreadsheet File of .dat file: 377.88 6.326826E+03 2.024894E+03 253.794  377.89 6.328341E+03 2.026409E+03 253.984  377.90 6.329855E+03 2.027923E+03 254.173  377.91 6.331370E+03 2.029438E+

  • Firefox is already in use error (even after other support)

    first, I want to start off by telling you I've tried all the other steps before even posting this. 1. The parent.lock file only opens when firefox is open, and I can't delete the file while firefox is open 2. I click off the read only on the profile

  • Workshop 6 Bug with STLport hash_map operator []

    Using hash_map<string, string>:operator[] in a debug build crashes; in release, it doesn't. This must be a compiler bug, yes? Here's how to reproduce it. <PRE> [valhalla:~/test] $ cat t.c #include <string> #include <hash_map> using namespace std; mai