transmission of data in the url, what happens if no data is transmitted

I work in php with MySQL.

Some pages of my site require certain data to be passed in the url. In most cases, it is "data_region". If this is not passed in the url, I get an error of "undefined index". Is there a way to tell:

If "data_region" exists, use the information that it passes.
use else '? data_region = ALL'

Right now I use a web redirector on the index page to the main.php with the correct data_region instead of having main.php as the index. It's OK, but it sometimes takes a while, especially on slower connections.

Any help appreciated.

My code:

deadlyhifi wrote:
> I don't see what you're trying to do here, but it does not work because it is
> looking for '? data_region' in the URL. I need to apply
> 'data_region = ALL' when 'data_region' is not mentioned in the URL.

In this case, put this at the top of your page:

If (! isset($_GET['data_region']) $_GET ['data_region'] = 'ALL';)

--
David powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

Tags: Dreamweaver

Similar Questions

  • When the employee what happens in an InDesign library if the person shares the library leaves creative cloud?

    When the employee what happens in an InDesign library if the person shares the library leaves creative cloud?

    Disappeared from the library, or you can still access it? And is it possible to export libraries?

    Example: We have a general account of creative cloud for freelancers or employees to use on a workstation. We have created several libraries that we then fall to the members of the team. If we close this g/l account, what happens to all the libraries? Can we change ownership, or export or what? Any ideas? Thoughts?

    Thank you!

    Found the work around on my own. Everything you have to do is to copy a library someone has shared with you and add it to your library and makes you the owner also.

  • Data transmission of form through the URL arguments

    Is it possible to pass the data as arguments to a URL link that will populate the fields of a particular form?

    Something along the lines of http://sample.com \form.pdf?txtField1="value 1", txtField2 = 'value 2' or something similar, even remotely.

    Yes, you do, it doesn't happen automatically. All features must be implemented in JavaScript, and the data must be encoded in the URL, using the quotation marks around of the field values is not kosher. Spaces must be encoded using the character '+' or ' % 20 ', for example.» Other characters must be encoded in the same way. Any reference that explains the URL encoding will have more information.

    The sample that I have which includes the necessary JavaScript code an acroform, not an XFA form, then it would be a help for you. You need to set up a script that runs when the document is opened (for an XFA document docReady event). The script should get the value of event.target.path (or event.target.URL), gets the query string (the part after the? characters in the URL) and analyzes the name pairs / value. It then uses this data to set field values.

    Edit: You may be able to implement the code using FormCalc, but I use it a lot, so I can't help with that part.

  • I contracted the CC, however, I only got trial versions on most of the products, what happens when the 30 day trial runs?

    I am a teacher and I contracted CC yesterday, my payment has already been compensated but on the app the most programs CC is actually trial versions, I thought that I would have full access to all the site adobe programs.

    You're right, she was refitted & order number is also correct.

    Please do not hesitate to me private message where you need help.

    Concerning

    Baudier

  • What happens to the hot manual Tablespace backup operation, if...?

    What happens to the hot Tablespace backup operation, if a space of tables in the database is not backed up?

    Suppose if my database has 15 spaces for storage, I started the tablespace hotbackup by using the command "Alter Tablespace Begin Backup < tblsname >" & one by a tablespace in backup.
    If I backup a tablespace in the database, what happens to hot from the backup operation? It ends with success or failure?

    Published by: 874458 on November 7, 2011 20:41

    If the tablespace is completely self-contained, and then a recovery operation would increase for her.

    If things point back and forth between this tablespace and others, you could be in deep Doo - Doo.

    But if you have all available archived logs when save you it, it may be possible to recover. I remember that MOS has a doc on how to recover a tablespace never backed up, entirely from archived logs.

    It depends on. What is failure?

    Use RMAN, anyway.

  • Impossible to open new tabs or load new sites by typing in the URL.

    When I click on the button "+" to open a tab (or on the file menu) nothing happens. Also when I try to go to a new web page by typing the URL, nothing happens. A new web page and the tab only opens by clicking on an element of search result (Google). Back on Mozilla does not help.

    Note: Printing data of the troubleshooting information below removed in order to limit the characters less than 30,000.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do not click on the reset button on the start safe mode window or make changes.

    You can use one of them to start Firefox in safe mode:

    • On Windows, hold down the SHIFT key while starting Firefox with a double click on the shortcut to the desktop Firefox
    • On Mac, hold the Options key when starting Firefox
    • Help > restart with disabled modules

    If that doesn't work in Firefox Safe mode then disable all extensions (Tools > Modules > Extensions) and then try to find out who is causing by allowing an extension at a time until the problem reappears.

    Close and restart Firefox after each change through "file > exit ' (Mac: ' Firefox > leave";) Linux: "file > exit ')

    See also:

  • What happens if my computer cannot process a pretty quickly timed loop?

    If I created a loop timed, but required that more important than my computer treatment is able to do before the next iteration the tasks within the loop, what happens?  It gives me an error or I miss loops?  In the end, I need to know how can I know if the problem occurs.

    Please see the setting the Mode of a section of the loop timed in the following document.

    http://zone.NI.com/reference/en-XX/help/371361F-01/lvconcepts/configuring_the_labview_timed_loop/

    The left consider the following section describes the information that you can access on the previous iteration of the timed loop.

    http://zone.NI.com/reference/en-XX/help/371361F-01/Glang/timed_loop/

  • What happens to the data on my iPhone and iPad, if I need to cancel my contract with O2?

    What happens to the data on my iPhone 5 and iPad if I have to cancel my contract with O2?

    I can't say for sure, but probably nothing will happen for her.  When my wife got a new iPhone, we disconnected his former service. We went there on a few months later and everything was still there, it just wouldn't connect a data plan or phone of course service. It has worked well for a wi - fi connection.

  • What happens if I delete all the data of the Web site on my iPad mini?

    What happens if I select the option DELETE all THE DATA of the WEB site under Safari in the settings on my iPad mini?

    It clears all cookies, data, and the history of Safari.

  • I formatted a hard drive of 250 GB using ntfs and the data stored on it, my old hard drive died, so he was replaced now when I go into windows, it shows the drive as raw what happened?

    The old hd wd swarmed so it has been removed, a new one installed Windows xp now when I go into windows, it shows the active partition, but no system file and when you try to access it, says I need to format the hard drive, what happened to all the data that I had before?

    I found a program to retrieve all the data myself using easeus.com

  • What elements of the page get included in the URL on doSubmit()?

    It's quite perplexed me.

    I have a page with 5 items on the page in a region in a table. All of them are hidden and protected.

    The page is loaded with one of these items on the page specified in the URL.

    If I use the button to delete one or more rows on the, or click on the button "Add new line", the page is submitted and returns with three of these five elements in the page specified in the URL.

    First question: why only 3 and not all 5? Why THESE three? I see no difference between one of the page elements appear in the URL submitted from that which is not.

    Second question: I've changed one of these page items to display conditionally. If a certain condition is not met, the field is never out of the page. However, EVEN THEN when I send the page using one of the buttons above, the field is included in the URL submitted! Should that even happen? That actually seems a safety hazard, unless there is something I am doing wrong.

    I can probably create a test page to apex.oracle.com if necessary. (It of now on apex.oraclecorp.com, but move it will take time because I'll have to remove some sensitive data). But I hope that it is just some easy concept to explain, I'm just not grasp.

    Thank you.
    -Keith

    Hi Keith,

    (1) check the branch. the branch defines what happened on the next page.

    (2) Yes, this is the correct behavior. condition is for rendering, but the direction is fixed.

    brgds,
    Peter

    -----
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    Work: http://www.click-click.at

  • What happens if I buy a macbook, then they release the new model?

    I went into my local Apple store and they asked me where I needed my computer by because they have an event 7. Now I need to buy my computer before then (I also want to free beats since I was a student). However, what happens if they release a new macbook right after that I have to buy mine? I think that the person in the store says that if you buy within 60 days of a new version they'll move your model to the newest one. Is this true? Also if this is how it works with online shopping, is 60 days since you ordered online or 60 days because you have actually received your macbook? (I assume that since you place your order)

    Thanks for your help!

    What happens if you buy a car or a TV, or other technology and then a few days later a new model comes out?

    You always bought what you paid for.  There may be exchange for privileges, or you may be able to sell your privately purchased item and then buy a new one.  Or you can be very happy with your purchase and keep and enjoy.

    In the case of the MacBook, if you buy a new computer running El Capitan, you will certainly be able to upgrade to MacOS Sierra once that came out later in the fall.

    If you can wait and explore the unknown, with unknown characteristics and an unknown release date, or you can buy a known quantity as soon as possible.

  • What happened to the "bookmark this page" in my bookmarks drop down box? I need! I am not computer savy and want to just scroll through all the pa marked with a bookmark

    The toolbar previous at the top of the screen re: bookmarks had the easier and is more agreed for me (and I'm sure MANY OTHERS) to just click, scroll, stop and click and fact! I'm on page that I bookmarked. So now, no? and what happened to the "mark this page" option initially drop down list? It's so easy. I have to develop records, files, plugins, etc...
    What in is he developed a method for people who are geeks high tech click on something that will lead THEM to last orders?

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    /* move "Show All Bookmarks" to the top of the Bookmarks drop-down list */
    #BMB_bookmarksPopup #BMB_bookmarksShowAll {-moz-box-ordinal-group:0}
    
    /* move "Show All History" to the top of the History drop-down list */
    #PanelUI-history > * {-moz-box-ordinal-group:3!important}
    #PanelUI-history > label.panel-subview-header {-moz-box-ordinal-group:1!important}
    #PanelUI-history > #PanelUI-historyMore {-moz-box-ordinal-group:2!important}
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    • Create the folder chrome (lowercase) in the .default < xxxxxxxx > profile folder if the folder does not exist
    • Use a text editor such as Notepad to create a userChrome.css (new) file in this folder (the names are case-sensitive)
    • Paste the code in the userChrome.css file in the Editor window and make sure that the userChrome.css file starts with the default @namespace line
    • Make sure that you select "All files" and not "text files" when you save the file via "save file as" in the text editor as userChrome.css. Otherwise, Windows can add a hidden .txt file extension and you end up with one does not not userChrome.css.txt file

    You can use this button to go to the Firefox profile folder currently in use:

    • Help > troubleshooting information > profile directory: see file (Linux: open the directory;) Mac: View in the Finder)
  • How to remove bing toolbar and don't let him get what you type in the URL of goto

    This isn't really a question, but I hope this will help some people. I got the bar of bing tools appear at the top of firefox, and I tried all the suggestions that I have found to remove it, in addition to the ways that I already knew. Nothing worked... until I looked in tools/options and found that my homepage had been changed. I just changed it back to what it was before that bing took over. Now, everything is back to normal.

    Hi I do not know if I'm in the right place or not, but this thread seems to be closest to my problem, which is the following (see picture):

    Everytime I type something in the URL (address) bar, the first options are Bing search results.

    Now, the more funny thing is, that it is the ONLY symptom that my present system as part of the Bing struck by lightning. There is no additional toolbar, no change in default search engine, no change of default home page, this is not supported my new tabs; He is not anywhere among the modules etc (I guess you would say I'm lucky for that, but "just ignore it" is certainly not the answer I'm looking for.)

    I tried on different solutions 8-10 posted on various forums, but nothing helped. I did the thing "manage search engines"; I looked around the Add - ons & Extensions for anything remotely suspicious; I tried the key word. Solution URL; I went to the System32 folder to change the hosts file (hell, I don't even know what it is). I even reinstalled Firefox from the Mozilla homepage (!), and nothing happened.

    So what now...? Can someone help me? Thanks in advance.

  • What happened to add the button update?

    Previously, the help tab would show a feature update Add-ons,
    What happened to this service?

    Thanks for the tip and take the time
    to answer my question.

    Here is how I found this:

    go to 'tools '.

    Select "Add-ons" in the Tools menu

    Select 'Plugins' in the left menu

    Select 'check to see if your plugins are up to date.
    at the top of the list of Plugins.

    It was much easier when he was on the HELP page
    with a large icon, so I do not know why FireFox
    made the change.

Maybe you are looking for