Skip navigation
chris blockus
Currently Being Moderated

Passing data through url from an update form

Mar 2, 2012 3:56 PM

Ok, quick question that I hope will be easy to answer.  I'm using Dreamweaver CS4 and I've built an update form that, upon submission, I'd like to pass an ID on to the next page.  I've inserted the update form behavior, pointed to the right page in the "on submit" topic, and identified  and named the id in "Parameters. When I run the update form, it directs to the right page, but in the url the value that's being passed is "ID=&".  Obviously, the appropriate information is not being loaded on the next page.  The only reason I can think that this would be happening is that the ID in question is generated dynamically in the field on the update form.  In other words, its not a static value.  Does anyone have a solution to this problem?  I'd greatly appreciate it.

 

Thanks!

 

-CB

 
Replies
  • Currently Being Moderated
    Mar 2, 2012 4:06 PM   in reply to chris blockus

    Make sure that you have read the following

     

     

    Announcement: How Important is Code? A plea for new posters to help us!

    Please don't ask a layout question (or really almost any other question) here without also giving us a look at the code on your page.

    The best way to do this is to upload the page and its dependent files, and to post a link to this uploaded page.  A poor second alternative would be to paste your code into your post using the double chevron icon on the toolbar, and selecting Syntax Highlighting > Plain Text.

     

    Without knowing what you have in your code, we cannot possibly answer anything other than a very simple question.  Save us the trouble of engaging in twenty questions to find out what you have done and just show us the code.  After all, it's what determines what happens on the page, not your screenshot or your description.

     

    Please?

     

    Also, if your question is one that involves database use or server-scripting, please tell us what server model (PHP, CF, etc.) and database you are using (MySQL, SQL Server, etc.), as well as the operating system and platform.  All of those details are necessary for complete troubleshooting and will help us help you through the process!

     

     

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2012 8:44 PM   in reply to chris blockus

    I am not sure, but I think you are talking about the following line of code

    <select name="jumpMenu5" id="jumpMenu5" onchange="MM_jumpMenu('parent',this,0)">

    If so, then change this to

    <select name="jumpMenu5" id="jumpMenu5" onchange="MM_jumpMenu('parent',this.value,0)">

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2012 10:25 PM   in reply to chris blockus

    You ARE passing Character_ID with a value of 14 to the next page. But you are using the POST method, so you will not see this in the querystring. In your /castsupport.php page,  you need to retrieve variables sent via POST, not GET. Or, change the method in the form to GET.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 5, 2012 4:04 PM   in reply to chris blockus

    >bregent said that I was passing the variable using post, but I'm 99% certain that is not the case.

     

    The form that you showed us was using POST, not GET.

     

    >That brings me back to my original point.  Why is the value being passed

    >through the query string Character_ID=& instead of Character_ID=14?

     

    Don't know. We'd need to take another look at your code, but it appears you have removed that page.

     

    >What am I missing?  bregent, how did you determine

    >that I was passing the value of 14 on?

     

    IIRC, that was the value populated in the Character_ID form field.

     

    The answers are in the code. If you want help you need to show us all of the code in all of the pages involved with this workflow.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 5, 2012 4:40 PM   in reply to chris blockus

    We can only see the client code in the links you posted. We'd really need to see the complete code with server side scripting.

     

    >As a test, I tried putting in a static "14" in the parameter instead of the

    >dynamic "Character_ID" value from my recordset.  The URL ammended to

    >"Character_ID=14&" and an "echo $_GET['Character_ID'] printed 14.

     

    Then maybe I'm looking at a different form on that page; you have several. The one I am looking at is name="castsupport".  It is using POST. Forms that use POST do not add anything to the querystring. 

     

    Also, you do not need to include the '?' in your form action page name: "castsupport.php?"

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points