sending a post variable to php

Get help using Construct 2

Post » Wed Mar 05, 2014 3:56 pm

Message: liquidchaos is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hi. First post here.

ive been trying to send a variable over to php using $_post.

On button click ajax

"[email protected]" & TextBox.TEXT

Sent to $_POST ['email']
Echo "true"

The "true" should be sent to the lastdata variable but it doesnt seem to be going. The php script works but I think I must be missing something
Posts: 3
Reputation: 131

Post » Fri Mar 07, 2014 10:42 pm

Is there no one who can help?
Posts: 3
Reputation: 131

Post » Sun May 04, 2014 1:12 am

My code works fine in Android, but doesn't work in HTML5 :(


File upload.php



$img = $_POST['photo'];
define('UPLOAD_DIR', 'user_photo/');

$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);

$data = base64_decode($img);

$file = UPLOAD_DIR . uniqid() . '.png';

$success = file_put_contents($file, $data);

echo $file;

Posts: 1
Reputation: 177

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests