Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7180689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:24:04+00:00 2026-05-28T17:24:04+00:00

Used this script many times to pass 1 or 2 values to a PHP

  • 0

Used this script many times to pass 1 or 2 values to a PHP file, works fantastic. Using it now to pass 7 values and only the first 2 get through.

$(document).ready(function(){
$("form#send_note").submit(function() {
var to_user = $('#to_user').attr('value');
var from_user = $('#from_user').attr('value');
var defaultpic_from  = $('#defaultpic_from').attr('value');
var defaultpic_to = $('#defaultpic_to').attr('value');
var your_username = $('#your_username').attr('value');
var message_title = $('#message_title').attr('value');
var message_contents = $('#message_contents').attr('value');
    $.ajax({
        type: "POST",
        url: "../inbox/send_note.php",
        data: "to_user="+ to_user +"& from_user="+ from_user + "& defaultpic_from="+ defaultpic_from + "& defaultpic_to="+ defaultpic_to + "& your_username="+ your_username + "& message_title="+ message_title + "& message_contents=" + message_contents,
        success: function(){
            $('form#send_note').hide(function(){$('div.success2').fadeIn();});

        }
    });
return false;
});
});

I have double checked all of the names, all is in order it’s just the values after from_user (defaultpic_from) and so on won’t go through.
I believe it’s the way I have the “data:” listed. I am a complete newbie when it comes to javascript so any advice on the properway to get these through would be fantastic!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:24:05+00:00Added an answer on May 28, 2026 at 5:24 pm

    I bet the value of your default pic is terminating the query string. You can wrap your vars like this to ensure they are properly escaped:

    $(document).ready(function(){
        $("form#send_note").submit(function() {
        var to_user = encodeURIComponent($('#to_user').attr('value'));
        var from_user = encodeURIComponent($('#from_user').attr('value'));
        var defaultpic_from  = encodeURIComponent($('#defaultpic_from').attr('value'));
        var defaultpic_to = encodeURIComponent($('#defaultpic_to').attr('value'));
        var your_username = encodeURIComponent($('#your_username').attr('value'));
        var message_title = encodeURIComponent($('#message_title').attr('value'));
        var message_contents = encodeURIComponent($('#message_contents').attr('value'));
            $.ajax({
                type: "POST",
                url: "../inbox/send_note.php",
                data: {to_user:to_user, from_user:from_user, defaultpic_from: defaultpic_from, defaultpic_to:defaultpic_to, your_username:your_username, message_title:message_title, message_contents:message_contents},
                success: function(){
                    $('form#send_note').hide(function(){$('div.success2').fadeIn();});
    
                }
            });
        return false;
        });
        });
    

    You will need to urldecode the post vars in php but that should do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I googled this many times but now I have to ask it here. I
I am using colorbox which I have used many times for different clients, but
I am seeing both of them used in this script I am trying to
This one boggles my mind. I've used this same script (different targets of course)
I used to use this script for jquery email obfuscation: $(.replaceAt).replaceWith(@); $(.obfuscate).each(function () {
I have a simple script which is used to start another program. This other
I used this guide on Apple's website to enable PHP on my computer but
Using php I'd like to subtract/minus two times; each time within a separate document
the first javascript < script >< /script > in google looks like this: (note
Till this moment I used this method to invoke: public string AddText { set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.