Hello everyone,
I am going to do these things:
1. using php connect mysql with the php code (done already)
To upload a by php code, we need to encode the photo into code, therefore:
2. how to I encode the photo?
The b4a code I will use like this:
XXXXXXX is the encoded photo, how can I generate it? Can anyone give me a hint, thank you.
3. How can I read that photo in the b4a application later on? Besides, if I want to download the photo, what is the process?
I am hoping to see any help!!!! Thank you.
Alpha
I am going to do these things:
1. using php connect mysql with the php code (done already)
B4X:
<?php
include ("DBconnect.php");
$action = $_GET['action'];
$photo = $_GET['photo'];
switch ($action)
{
Case "send":
$sql = "INSERT INTO `u907875456_test`.`phototesting` (`photo`) VALUES ('$photo');";
mysql_query($sql);
}
?>
2. how to I encode the photo?
The b4a code I will use like this:
B4X:
Sub button_Click
Private upload As HttpJob
upload.Initialize("photoupload", Me)
upload.download2("http://athrun999.16mb.com/photo.php", Array As String ("action", "send", "photo", XXXXXXX))
End Sub
XXXXXXX is the encoded photo, how can I generate it? Can anyone give me a hint, thank you.
3. How can I read that photo in the b4a application later on? Besides, if I want to download the photo, what is the process?
I am hoping to see any help!!!! Thank you.
Alpha