Search the Community

Showing results for tags 'POST'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 18 results

  1. Hi all, I have an android application which communicates with a php page to insert data into mysql table. it was functioning well on an windows server. Recently we were forced to move the application to a linux sever for some other reason. After that some error is returned. When I cross checked every thing, no data is received from the android application to the php page. Android send data using post method. Content type is "application/x-www-form-urlencoded". Data is encoded using UTF-8 format. I can see the variables values correctly in android app. But when we fetch it in Php page "null" is returned. When we assign a value in php page it works The same code was working finely on windows server. So I have concluded that problem was with the server settings. Default charset of server was not UTF-8 and I asked server team to set it so and they did the same adding the following code .htaccess file // .htaccess code suPHP_ConfigPath /home/vyapary/php.ini ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 week" ExpiresByType image/jpeg "access 1 week" ExpiresByType image/gif "access 1 week" ExpiresByType image/png "access 1 week" ExpiresByType text/css "access 1 week" ExpiresByType application/pdf "access 1 week" ExpiresByType application/x-javascript "access 1 week" ExpiresByType application/x-shockwave-flash "access 1 week" ExpiresByType image/x-icon "access 1 week" ExpiresDefault "access 2 days" </IfModule> ## EXPIRES CACHING ## <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> <IfModule mod_php5.c> php_value default_charset "UTF-8" </IfModule> <IfModule mod_php5.c> php_value safe_mode off </IfModule> <IfModule mod_php4.c> php_value safe_mode off </IfModule> Is there any other setting to be changed or added in .htacess to get it working Android code String pdts=jsonobj.toString(); String citms=citm.toString(); url = new URL("http://www.mydom.in/myphppage.php"); String pdtsenc=URLEncoder.encode(pdts, "UTF-8"); String citmsenc=URLEncoder.encode(citms, "UTF-8"); String param = "cdt=" + pdtsenc + "&idt=" + citmsenc; conn=(HttpURLConnection)url.openConnection(); conn.setDoOutput(true); conn.setRequestMethod("POST"); conn.setFixedLengthStreamingMode(param.getBytes().length); conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); PrintWriter out = new PrintWriter(conn.getOutputStream()); out.print(param); out.close(); Php code $cdt = urldecode($_POST['cdt']); //this returns null $cdt = json_decode($cdt , true); $idt = urldecode($_POST['idt']); // this returns null $idt = json_decode($idt , true); Please suggest a solution for this Thanks in Advance!!!
  2. Hi, I am currently trying to implement the posting of a canvas image to a Twitter wall.Below, first you see the JS I came up with.What I can't figure out is how am I supposed to get the keys and tokens provided in the PHP function below that code. Such PHP function is contained in the uploadFile.php file.JS: var base64img = canvas.toDataURL().split(',')[1]; $.ajax({ url: "uploadFile.php", type: "POST", data: base64img, processData: false, contentType: "application/octet-stream", }).done(function(respond) { alert(respond); }); PHP: function _microsite_last_tweets($search) {define('CONSUMER_KEY', 'my key');define('CONSUMER_SECRET', 'my key');define('ACCESS_TOKEN', 'my key');define('ACCESS_TOKEN_SECRET', 'my key');$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);$content = $connection->get("account/verify_credentials");if ($search[0] == '@' && strpos($search,' ') == false) {$user = substr($search, 1);$tweets = $connection->get("statuses/user_timeline", array("screen_name" => $user, "count" => "4"));}else {$search = urlencode($search);$tweets = $connection->get("search/tweets", array("q" => $search . '+exclude:retweets', "result_type" => "recent","count" => "4"));}return $tweets;}
  3. hello! I have just started learning about html, css and all that stuff.. I am beginning to get an understanding.. But there is something that really annoys me! This is used to automatic retrieve post title, link and content.. but how?? I would like to have a featured image+some text on my first page, instead of the whole post! ${ } <div class="entry"> <h2> <a href="${EntryCategoryLink}">${EntryTitle}</a> </h2> <div class="content">${entrybody}</div>
  4. Good morning Would someone be able to guide me with some coding tips? I'm trying to post some current page info into a form on the next page. Either pass the page url, the page title, or the H3 tags through the "Enquire" & "Book now" buttons from the below php file. The fields on the form will then be hidden from view but passed through the submit button. I need help passing the info in this code below: <!--<div class="fright">--> <p class="packagebuttons"> <a class="button print" href="#" onclick="window.print();">Print</a> <!-- <a class="button thickbox" href="#TB_inline?height=500&width=700&inlineId=modalEnquire_<?php echo $node->nid; ?>&modal=true">Enquire</a> <a class="button thickbox book" href="#TB_inline?height=500&width=700&inlineId=modalEnquire_<?php echo $node->nid; ?>_book&modal=true">Book</a> --> <a class="button" href="#goto_form">Enquire</a> <a class="button book" href="#goto_form">Book</a> </p> <?php ukgirl_modal_enquire($node,'package'); ?> <?php ukgirl_modal_enquire($node,'package','book'); ?> <!--</div>--> <div class="clear"></div> Many thanks for anyones help this close to Christmas!
  5. I try to create an Upload with javascript nad progress bar. i found this code in the internet, but i can't change the code for my idea. This is the script sample: var client = null; function uploadFile(){ //Wieder unser File Objekt var file = document.getElementById("fileA").files[0]; var formData = new FormData(); client = new XMLHttpRequest(); if(!file) return; formData.append("datei", file); client.onerror = function(e) { alert("onError"); }; client.open("POST", "upload.php"); client.send(formData);} my first problem is, that the autor used ONE input tag an set no MULTIPLE. I have a multiple input tag. I think it's enoug to change: var file = document.getElementById("fileA").files[0]; to var file1 = document.getElementById("file1").files; //dlete [0] for all files and formData.append("datei", file); to formData.append("file1[]", file);// add [] to create an array is this correct? AND MY IMPORTANT PROBLEM is, that i have more input tags: <form> <input type="file" name="file1"> <input type="file" name="file2"> <input type="file" name="file3"> </form> How can i pass the code for mulitple tags with different names??????? I search since 4 days for an idea. It will be perfect, if i can send all input with ONE clinet. IT's really important to read the files with $_FILES[file1], $_FILES[file2]
  6. I'm be interesting in to ask to you that does the w3schools forum poster from where we can start the new topic can't allow copy paste operation. if do so than why? or if not why can I can't copy paste the code.
  7. I want to make a page where on each **tags** :My page should look alike : http://www.missmalini.com/aamir-khan-2/Above page is coming from http://www.missmalini.com/celebrity-fan-pages/this are categories with **Tags** :I also know that the patten is likeBig Image is First ( **First** latest Post of resp. tag )... then 4 image with title are from **Second** post )and then only title after **sixth** post .. its means they have **divide latest 10-12 post** with this structure..2 } if u see on top ( above Ten Latest Aamir Khan Updates ) there is "**Aamir Khan Full Bio** " which is ***different*** for resp. **tags**.3 } If Scroll Down there is Photos and Videos of resp. celeb ( which is tags or may be category wise )Hence how i can do this ( means how i can make such Own Custom Page code ) can any one let me know.
  8. I was not sure whether this question belongs here of in the PHP forum since my problem may be with one or the other or both. I use the following html and php code to select and upload multiple files.HTML <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple="multiple"/></br> <input type="submit" name="submit[]" value="submit" /> </form> uploadFiles.php <?php if(isset($_POST['submit'])) { if ($_FILES["file[]"]["error"] > 0) { echo "Error: " . $_FILES["file[]"]["error"] . "<br>"; } else { $numFilesUploaded=count($_FILES['file']['name']); echo "No. files uploaded : ".$numFilesUploaded."<br><br>"; for ($inc=0; $inc<$numFilesUploaded; ++$inc){ echo "File " . $inc . ": " . $_FILES["file"]["name"][$inc] . "<br>"; echo "Upload: " . $_FILES["file"]["name"][$inc] . "<br>"; echo "Type: " . $_FILES["file"]["type"][$inc] . "<br>"; echo "Size: " . ($_FILES["file"]["size"][$inc] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"][$inc]; echo "<br><br>"; } } } ?> If I select 2 files, each having names of character length 8, the code works fine. However, when I select files with names of character length 32, $_POST is an empty array. What is the best way to upload multiple files where the file names may be long? I ran phpinfo() and it did indeed say "This server is protected with the Suhosin Patch 0.9.10 ..." Some people have suggested that it may be a problem with the file size. However, I never get to even try to upload files since the names are not properly passed to the PHP code if the filenames are too long. Also, I have modified /etc/php5/apache2/php.ini to allow the upload of files larger than the files I am trying to upload. Also, I do not have this problem if I shorten the names of the files I am having trouble with. Many thanks in advance for any help.
  9. hi, so my problem is: i have a web page that produces a list [ul]. the list is the list of ftp sites that belong to a specific user in the database example: select * from user_ftps where user_id = 'x' great! that works fine. in this case i get three sites back belonging to the user. perfect. i also put a hyper link with a 'get' in the output so the user can click edit and edit the site they want. like so: if (mysql_num_rows($result) > 0) { while(list($db_id, $db_user_id, $db_name) = mysql_fetch_row($result)) { echo "<li>$db_name [<a href="ftps/edit?id=$db_id">edit</a>]</li>"; } } the problem is, using this method the user can alter the id in the url to the number of another user and see all their ftp sites. "Use Post with a hidden value" i hear you say. but if i do that i'll need to create a button for each 'edit' link. i think. not really a problem i surpose. but i want to know if there is a better way i can do this or if i'm just approching this in the wrong way and should be using a different method. regards, paul
  10. Hi ,Recently start making a blog and i have an issuewhen I am making a new post all are fine except post headerI type it in Greek and text is not showinghere is my bloghttp://bianconeroclub.blogspot.gr/and my templatehttps://www.blogger....pandWidget=true It looks like it's using a canvas to display the text, for some reason: <h3 class="post-title"><a href="http://bianconeroclub.blogspot.gr/2013/07/blog-post_9.html">ev<cufon class="cufon cufon-canvas" alt="Ποποβιτς " style="width: 9px; height: 23px;"><canvas width="27" height="27" style="top: -3px; left: -2px; width: 27px; height: 27px;"/><cufontext>Ποποβιτς </cufontext></cufon><cufon class="cufon cufon-canvas" alt="ναι, " style="width: 15px; height: 23px;"><canvas width="34" height="27" style="top: -3px; left: -2px; width: 34px; height: 27px;"/><cufontext>ναι, </cufontext></cufon><cufon class="cufon cufon-canvas" alt="Καμαρα " style="width: 9px; height: 23px;"><canvas width="27" height="27" style="top: -3px; left: -2px; width: 27px; height: 27px;"/><cufontext>Καμαρα </cufontext></cufon><cufon class="cufon cufon-canvas" alt="οχι!" style="width: 7px; height: 23px;"><canvas width="27" height="27" style="top: -3px; left: -2px; width: 27px; height: 27px;"/><cufontext>οχι!</cufontext></cufon></a></h3> Template Owner dont reply to me any idea?
  11. I'm thinking about developing a website that will use the following dynamic architecture: index.php?id=1index.php?id=2index.php?id=3index.php?id=4etc. As opposed to the static (old school): index.phppage1.phppage2.phppage3.phppage4.phpetc. What are the pros and cons in terms of caching, search engine indexing and other stuff you can think of?
  12. This is the same exact question here in http://w3schools.invisionzone.com/index.php?showtopic=46321. I just want to know how to do it in ruby. I just want to know how to use POST to retrieve info form a textbox and write it to a file called info.txt. just so you don't have to run back and forth between pages here is the html: example.htm <!DOCTYPE html><html><head> <title>POST Example</title></head><body><form name="example" method="POST" action="TheRubyFile"> <input type="text" name="value" /> <input type="submit" name="submit" value="Submit It"/></form></body></html>
  13. Hello. I am beginning per for cgi scripting. I have been trying to find out how to do a simple form POST. I want it to take the info from a textbox and then write it to a file called info.txt. Every POST example I have found is too complicated. Please tell me if GET would be better suited for this. I just want someone to teach me how. Here is an example html file: example.htm <!DOCTYPE html><html><head> <title>POST Example</title></head><body><form name="example" method="POST" action="ThePerlFile"> <input type="text" name="value" /> <input type="submit" name="submit" value="Submit It"/></form></body></html>
  14. <form name="form" action="enter.php" method="post"> First Name: <input type="text" name="first" /><br /> Last Name: <input type="text" name="last" /><br /> <input type="checkbox" name="c1" value="1" onclick="showSubmit()" /> <input type="checkbox" name="c1" value="1" onclick="showSubmit()" /> <input type="checkbox" name="c3" value="1" onclick="showSubmit()" /> <!-- SUBMIT BUTTON HERE --> </form> If I only check the 1st and the 3rd checkbox and press the submit button, but in my enter.php, I made it check print out each of the inputs like so: <?php echo $_POST["first"];echo $_POST["last"];echo $_POST["c1"]; echo $_POST["c2"]; echo $_POST["c3"];?> I will get a warning/error claiming that the c2 is undefined. Is there a built in function that checks if something is undefined ? That way I can use a if and else statement: if is it undefined, it will print something, and if it is checked (defined), make it print something else.
  15. hello everyone, it is long time ago that i visited this forum. and as i see there is better user interface. i really enjoy it. now to my issue: ap-town.php for example select options are postcodes: NW2-Cricklewood - value="40"N1-Hixton - value="44"NW2-Kilburn - value="39" <form action="ap-town-process.php" method="post"><select name="town"><option value="" selected="selected">Destination Town</option> <?php while($town_rows=mysql_fetch_array($town_result)) { ?> <option value="<?php echo $town_rows['lhr_town_value']; ?>"><?php echo $town_rows['lhr_town_to'];?></option> <?php } ?> </select><input type="submit" /></form> ap-town-process.php <?php $ap_town_towns=$_POST['town']; $query_towns=mysql_query("SELECT * FROM lhr_town WHERE lhr_town_value='$ap_town_towns'") or die(mysql_error());$fetch_towns=mysql_fetch_array($query_towns); ?> <form action="ap-town-execute.php" method="post"> <input type="text" name="ap_town_dropoff" value="<?php echo $fetch_towns['lhr_town_to'];?>" readonly="readonly" /> <input type="submit" /></form> the drop in ap-town.php takes the values from the database and would be processed at ap-town-process.php. if i select NW2-Cricklewood in the ap-town-process.php it would give me N1-Hixton altough the values are completly different. in some cases the values are the same, but the but the names area names different. please help me fix this issue.
  16. i have seen on many live streaming blogs/websites there are 2 servers, if default server stream does not work due to any reason, than alternate server 2 stream works, i also want to achive same objective for my blog, i will write in default post "if this stream does not work click here" and 2nd stream should load, kindly suggest me html/javascript coding to achieve my desired goal. thanks
  17. So first my user enters their name. examplevar username = "Scott" So i want this to carry over to the next page. Right now var username is only accessible on this page. Right now, I start on the index.html, user enters name, on welcome.php it says hi scott, then on account.php I want it to say hi scott again, but it says that the value has not been declared. How can i transfer this variable using the URL or a form or something? By the way, welcome.php redirects to account.php, so it needs to be something automatic.
  18. I am new to web programming and I think I am missing a simple concept that is keeping me from going forward. I have a hosting account with Go Daddy and I want to send a bunch of data to my server or to an e-mail address. I have a bunch of buttons with values populated from an "onclick" command and I want all that button data to be sent somewhere. This is where I cannot figure out how to proceed. Please help.