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 9115095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:20:57+00:00 2026-06-17T04:20:57+00:00

I am receiving vars from AS3 via php script and inserting into db. all

  • 0

I am receiving vars from AS3 via php script and inserting into db. all the vars are being passed as you can see in the address bar .. ( which i would like to hide from public but dont know how) .. I then get the vars and insert to db table. all tables are set ok i think. I am catching the vars also for an echo. all vars working but “image_name” and its not translating to the $tmp_name for the echo either. Any ideas on this one ..
Here is the line in browser holding the vars.

http://xx.xxx.xx.xxx/wordpress/?page_id=81imageName=WhitetailJackalope%2Epng&imageURL=http%3A%2F%2Flocalhost%2Fxxx%2Fxxx%2FserverImages%2FwhiteTailJackalopeEgg%2Epng&imageID=40

here is the PHP

<?php


$tmp_id=$_GET['imageID'];
$tmp_url=$_GET['imageURL'];
$tmp_name=$_GET['imageName'];

mysql_connect("localhost", "xxx", "xxx") or die(mysql_error()); 
    mysql_query ( "INSERT INTO wp_image_data (`image_id`, `image_url`, `user_name`, `image_name`, `stage`)
        VALUES ('$tmp_id' , '$tmp_url' , '$current_user->user_login' , '$tmp_name' , 1)"); 
    echo 'Testing: ' . $tmp_id . '<br/>'; //displays ok
    echo 'Image: ' . $tmp_name . '<br/>'; //does not display or insert to table
    echo 'Owner: ' . $current_user->user_login . '<br/>'; //displays ok

?>

The table in the db for the image_name is VARCHAR(100) utf8_ganeral_ci

Any ideas ?

I have restructured the php as advised with the PDO format which seems to be good for me. Thank you for that information 🙂
Here is the restructured code. It works fine except for the image_name which i need to figure how to restructure my url now in wordpress.

try {

$conn = new PDO("mysql:host=$hostdb; dbname=$namedb", $userdb, $passdb);
$conn->exec("SET CHARACTER SET utf8");      

$sql = "INSERT INTO wp_image_data (image_id, image_url, user_name, image_name, stage)
    VALUES ('$tmp_id', '$tmp_url', '{$current_user->user_login}', '$tmp_name', '1')"; 
$q = $conn->exec($sql);   
$conn = null; 
}
catch(PDOException $e) {
  echo $e->getMessage();
}

    echo 'Testing: ' . $tmp_id . '<br/>';
    echo 'Image: ' . $tmp_name . '<br/>'; 
    echo 'Owner: ' . $current_user->user_login . '<br/>';

Now to work on the url … YAY and while im doing that is there a way to hide the passed variables in the address bar ?

  • 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-06-17T04:20:58+00:00Added an answer on June 17, 2026 at 4:20 am

    Your URL needs reconstructed to include an ampersand after the page_id value:

    http://xx.xxx.xx.xxx/wordpress/?page_id=81&imageName=WhitetailJackalope%2Epng&imageURL=http%3A%2F%2Flocalhost%2Fxxx%2Fxxx%2FserverImages%2FwhiteTailJackalopeEgg%2Epng&imageID=40

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

Sidebar

Related Questions

Receiving a segfault when running this very short script in Ubuntu. from osgeo import
I'm receiving an XML via php://input and after using simpleXML to break the elements
Am receiving null from json post using jquery. see my code below in order.
I am receiving Invalid Index COM exception when calling Excel.AddIns.Item[0] . Excel.AddIns.Count works all
receiving error: PHP Notice: Undefined index: mode in /web/ee_web/include/form-modal.php on line 51 line 51
After receiving very good correction from fuzzy lollipop, I amended my code to create
I'm receiving the following error from an ASPX page that is calling a WCF
Receiving the message Invalid argument when using shmget with the second parameter not being
In receiving iCal events from Outlook, it is specifying the timezone in the long
I am trying to parse date like this 2012-12-07T16:18:15+05:30 which I am receiving from

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.