CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Passing link paramters

Print topic Send  topic

Author Message
NerishaB

Posts: 25
Posted: 09/22/2010, 6:26 AM

Hi.

I have a webpage that contains client details. Some of the details include "Email", and "SMS". I have created these as links to another page, which will actually allow the user to either send an email, or and SMS to the client. I want to pass the parameter that the user clicks on as Email or SMS when they click on either one, so that my next form will know exactly what to do. At the moment, there is a radio button, that the user has to click on to chose whether to SMS or email the client. I want to remove the radio button, byt merely making the selection from the links created. How will I pass a parameter that the user clicked on?
View profile  Send private message
ckroon

Posts: 869
Posted: 09/24/2010, 8:11 AM

In the Link parameters add a new one:
type
For the email link make it type = email
for the sms, make it type = sms.

Have both links go to a new page: redirect.php

Make a new page and call it redirect.php

Put this code in the On Intialize View event.

//Redirect Page based on URL 'type'      
    
if(CCGetFromGet("type") == "email")    
{    
header("Location: send_email_page.php");    
}    
 if (CCGetFromGet("type") == "link")    
{  
header("Location: send_sms_page.php");    
{    
}  




_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
NerishaB

Posts: 25
Posted: 09/26/2010, 11:20 PM

I only have one page to either send email or sens SMS. Your code specifes that I must create 2 pages. One for email, and one for SMS. I dont really want to do that, is there a way to send the correct information so that I dont have to create 2 seperate pages for email and SMS?
View profile  Send private message
lvalverdeb

Posts: 299
Posted: 09/27/2010, 9:24 AM

Try:

$param = "send_whatever.php?type=".CCGetFromGet("type","sms"); //default to sms if type is empty or null
header("Location:".$param);


_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4
View profile  Send private message
NerishaB

Posts: 25
Posted: 09/28/2010, 3:20 AM

Where would I put that code??? In the same place, ie, the On Intialize View event of the redirect page?
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.