0

Error while inserting email address in the table

**[perl] my $username=$CGI->{salesrep}; return $username;[/perl]@gmail.com**

I want to insert this value in the table.

But It gives null when executed.

[query type=list sql="INSERT tech4less.outofstock_sku SET name='[value name]',customer_email='[value email]', phone='[value phone]', state='[value b_state]', postalcode='[value zip]', country='[value country]', **salesperson='[perl]$username[/perl]@gmail.com**', product='[value wish_product]', item_description='[value wish_descrip]', manufacturer='[value wish_man]',  category = '[value wish_cat]', business_yn='[value option]', date = now()"]

[/query]

4
  • What framework are you using for this? Commented Feb 3, 2012 at 11:19
  • Interchange ..this is an HTML page Commented Feb 3, 2012 at 11:27
  • Not familiar with it, is that this framework? (Asking because the [data-interchange] tag isn't really useful here - a separate tag for that framework would be welcome.) Commented Feb 3, 2012 at 11:31
  • icdevgroup.org/interchange-doc-5.2.0/frames/ictags_87.html pls see this Commented Feb 3, 2012 at 11:50

1 Answer 1

1

If $CGI is a CGI object then access a parammeter this way:

my $username=$CGI->param('salesrep');

Read this: http://perldoc.perl.org/CGI.html#FETCHING-THE-VALUE-OR-VALUES-OF-A-SINGLE-NAMED-PARAMETER:

Regards

Sign up to request clarification or add additional context in comments.

2 Comments

How to use this in the sql statement?
I am able to print this value on the page but having issues in inserting using sql..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.