skip to Main Content

No variables defined in jQuery ajax

I normally use javascript ajax and everything works fine, but wordpress requires jquery ajax which i am not familiar with. Why are the variables described in the following code are not defined? var option = "'USER_ID': 'my id is 32',"…

VIEW QUESTION

upload photo and text from form input and sending to telegram bot with php – Telegram API

html code: <form action="process.php"> <input type="text" name="name"> <input type="file" name="photo"> <input type="submit" value="Submit"> </form> process.php: define ('url',"https://api.telegram.org/bot****/"); $name = $_GET['name']; $img=$_FILES['photo']['name']; $chat_id = '****'; $message = urlencode("Name:".$name); file_get_contents(url."sendmessage?text=".$message."&chat_id=".$chat_id."&parse_mode=HTML"); I recieve text message but photo not. I don't know how to…

VIEW QUESTION
Back To Top
Search