close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

$_get['id']

Thread began 1/12/2012 9:05 am by salaroche | Last modified 1/12/2012 12:19 pm by salaroche | 1773 views | 10 replies |

salaroche

$_get['id']

Hi:

Is it possible to transfer the value stored in $_GET['ID'] to another page?

In the Search pages generated by the WA Wizard, $_GET['ID'] is used to display the chosen record in the Details page. Is there any way to use the value stored in $_GET['ID'] in an email form after the details are displayed?

Thank you for your attention

Sign in to reply to this post

Jason ByrnesWebAssist

the $_GET variable collection refers to the querystring at the end of the page address.

$
the variable $_GET['id'] referes to a url variable named id, for example:
page.php?id=22


you can pass that along to another page using a link:
<a href="page2.php?id=<?php echo(isset($_GET['id'])?$_GET['id']:""); ?>">click here</a>


as long as the id querystring variable is passed as part of the page address to the email page, it can be used in the email.

Sign in to reply to this post

salaroche

Jason:

Thanks for the tip. I'll try it ASAP.

Thanks

Sign in to reply to this post

salaroche

Jason:

In the link: <a href="page2.php?id=<?php echo(isset($_GET['id'])?$_GET['id']:""); ?> What would "page2.php" stand for? The "Details" page name or the "Email" page name? Also, do I insert that link in the "Details" page or in the "Email" Page?

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

page 2 stands for any page you want to send the id querystring variable to.

Sign in to reply to this post

salaroche

OK. I'll give it a shot.

Thanks

Sign in to reply to this post

salaroche

Jason:

I'm not sure I have understood this well. I pasted the link you sent me in the page that supposedly has the record ID stored in the $_GET['id'] variable and substituted the email page name for "page2" in the link, but the Email page is not receiving the value.

By the way, the following is the SQL query that retrieves the individual record whose ID # I would like to pass to the Email page:
-------------------
SELECT ID, Gender, FirstName, Nationality, Country, Occupation, MaritalStatus, HowMany, DescribeSelf, DescribeOther, Photo01, Hobbies, City, Children, HowMany
FROM profiles
WHERE ID = ParamID OR ( -1= ParamID2 AND ID= ParamSessionID)
--------------------
As you can see, there are 3 variables in that query: ParamID, ParamSessionID, and $_GET['id'].

I frankly don't know whether the record ID is stored in $_GET['id'] or in any of the other two.

Any suggestions?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of your pages in a zip archive so i can examine the code.

Sign in to reply to this post

salaroche

Jason:

Attached please find the three pages involved:

1) TResults displays a selection of records that meet certain criteria
2) TDetails displays (in an iFrame) any individual record selected by the user
3) InterMemberEmail is the page I hope will use the Individual Record ID.

The link "Click Here" in TDetails opens the InterMemberEmail Page

Attached Files
IDVariableSalaroche.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the TDetails.php page, change this code:

php:
<a href="interMemberEmail.php?id=<?php echo(isset($_GET['id'])?$_GET['id']:""); ?>
              <p><a href="InterMemberEmail.php">Click Here</a></p></td>




to:

php:
<p><a href="InterMemberEmail.php?ID=<?php echo(isset($_GET['ID'])?$_GET['ID']:""); ?>">Click Here</a></p></td>




and on the InterMemberEmail.php page, change

php:
<form class="NewFromBlank_Default" id="SimpleContact_NewFromBlank_Default" name="SimpleContact_NewFromBlank_Default" method="post"  action="<?php echo $_SERVER["PHP_SELF"]; ?>">



to

php:
<form class="NewFromBlank_Default" id="SimpleContact_NewFromBlank_Default" name="SimpleContact_NewFromBlank_Default" method="post"  action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>">
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...