Jump to content

Search the Community

Showing results for tags 'POST'.

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 19 results

  1. Hello. I have a bit of a problem with W3CSS and INPUTS (textarea) https://www.w3schools.com/w3css/w3css_input.asp Textarea is not referenced with the above page. Here is my HTACCESS :- RewriteRule ^([0-9]+)?$ /PATHNAME/yours_description.php?entity=$1 [nc,l,QSA] if i go in the URL - path/67 my script activates and the vaklue of $entity is retrieved. HOWEVER - PROBLEM. I want a TEXTAREA to be sent as a POST value. But no matter what I do in w3css, the textarea comes out as blank. (my php script also has print_r for $_GET and $_POST - the $description value isnt passed at all.) Here is my template <form class="w3-container w3-light-grey" action="/yours/description/{$entity}" type="POST"> <label>Your Business description</label> <textarea class="w3-input w3-border-0" name="description" rows="6" cols="45" value="{$description}"></textarea> <button class="w3-btn w3-brown">Update</button></p> </form> Is it possible to use a combination of GET and POST ? I'll rather use GET so a person can easily switch entities. But the rest of the form elements need to be in POST.
  2. I want to make something like this... Where user can create forum topic.. But, I will be using the parameter below.. (similar to form/input code of login/sign up).. The issue is that I have no understanding of what to put. 1) In the configuration ini text 2) As a code to display.
  3. Hi all, I found this code <div class="content-box-purple">text</div> to use for a box in a post. I copied this code: /* Content Box ------------------------------------------------------------ */ .content-box-purple { margin: 0 0 25px; overflow: hidden; padding: 20px; } .content-box-purple { background-color: #e2e2f9; border: 1px solid #bebde9; } to a style.css file. However, the box does not show in the post. I checked all plugins for compatibility and when deactivating them all, the box still does not show. Do you have an idea of what might be wrong? Thank you, Milada
  4. GREETING: One more quick question before the weekend begins. BACKGROUND: Until now, it has been easy to see the results of AJAX calls in the files that produce them. Until now, cURL was never an explicit part of my web-application. I am now making a dual call, however, and am unable to see the final result. The first call stipulates no method as nothing is sent. The second call is based on the result of the first call and uses the POST method to make the request. Although I can see the contents of the first request, I cannot see the contents of the second. Both files use identical cURL routines and both perform exactly as expected, as AJAX returns everything that is requested. Only the query statements of the URL are different. Even the specified AJAX dataType is the same for both calls -- namely, JSON. Please find below the code that produces the output that I wish to see, but cannot. The PHP for the 2ND AJAX CALL ini_set('log_errors', 1); ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'error.log'); ini_set('html_errors', 0); ini_set('display_errors', 0); error_reporting(E_ALL); if (!empty($_POST['ip_addr'])) { $ip_addr = filter_var($_POST['ip_addr'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); $url = 'https://.../matomo/index.php?module=API&action=index&visitIp=' . $ip_addr . '&idSite=1&period=week&date=today&method=Live.getVisitorProfile&format=json&expanded=0&token_auth=...'; $curl_request = curl_init(); curl_setopt($curl_request, CURLOPT_URL, $url); curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, false); curl_exec($curl_request); curl_close($curl_request); } QUESTION; What must I do to make the output of the cURL call visible in the file that produces it without disrupting the AJAX call that retrieves the output that I cannot see. Or, am I missing the whole point of cURL and the data is tranferred directly to the AJAX? But, why would I be able to see it in the first request, but not the second. Roddy
  5. I have a process that runs every 30 seconds and i want my script to check if it is finished. this way my user doesn't have to wait an arbitrary 30 seconds if the request is submitted closer to the 30 second mark (5 seconds to process instead of the max 30). I tried a while loop and sending $.post within it but from my console logging it doesn't appear to process the while loop as intended var iii = 1; while(iii < 30){ console.log("Checking rcon queue for " + characterID + " (" + iii + ")"); //Code to wait 1 second before continuing. var start = new Date().getTime(); var end = start; while(end < start + 1000) { end = new Date().getTime(); } //Code to $.post to check the the queue is cleared $.post('scripts/rcon_queue.php', {cID: characterID}, function(response){ if(response == "1"){ console.log("Queue is not cleared."); } else { console.log("Queue is clear."); iii = 30; } }); iii++; } console.log("Loading info for character: " + characterID); Now i would expect this to end the while loop response is anything but "1". Which happened after 7 attempts in my most recent test. But this is not happening:
  6. 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!!!
  7. 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;}
  8. 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>
  9. 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!
  10. 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]
  11. 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.
  12. 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.
  13. 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.
  14. 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
  15. 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?
  16. 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?
  17. 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>
  18. 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>
  19. <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.
×
×
  • Create New...