post

How to use PHP to POST to a web page then get the results back, locally

I have a page on my web server that is PHP that is set to do this if ($_POST['post'] == true) { echo: 'hello, world'; } I want to create a page that calls to that page, posts "post" equal to "true" and then returns the value "hello, world". I have a script that works, but only if the pages are on different servers. Unfortunately, bot...

Using PHP to get the source code of a URL I must be logged in to reach

I am trying to write a PHP script that will get the source code of a page in my Amazon account. However, to reach that page, I must be logged in. From what I understand, I should be able to accomplish this by posting the correct request headers, and then capturing the HTML response. Is that correct? If so, I'd really appreciate it if som...

WordPress: Giving a sticky post a specific fixed order

Is there a way to give a sticky post a specific order, rather than always displaying at the top of the list? For example, I want one sticky post to always display as the 5th post, and another to always display as the 8th. Thanks! ...

Stopping users posting more than once

Before posting my form I am checking the database to see if there are any previous posts from the user. If there are previous posts then the script will kick back a message saying you have already posted. The problem is that what I am trying to achieve isn't working it all goes wrong after my else statement. It is also probable that the...

Codeigniter form not submitting

I have using codeigniter form validation library to validate a form, below is the logic in my controller, public function addJob() { $this->load->model('jobwall'); if($query = $this->jobwall->getjobTitles()) { $data['select_options'] = $query; } $this->load->helper('form'); $this->load->library('form_vali...

POST XML to server, receive PDF

Similar to this question, we are developing a Web app where the client clicks a button to receive a PDF from the server. Right now we're using the .ajax() method with jQuery to POST the data the backend needs to generate the PDF (we're sending XML) when the button is pressed, and then the backend is generating the PDF entirely in-memory ...

cakePHP paginate with post data without sessions, serialization or post to get

I have created a small search and filter form method post in controller/index, which posts to it self the conditions and fields to paginate ( $this->paginate($conditions) ) However that is good for the first page, the subsequent pages the filer conditions are lost. pagination passArgs supports get variables well. Is there an un comple...

Struts2 action: how to know if HTTP request is GET or POST?

Is there a way to know in Struts2 action's method if this is GET or POST request? ...

Can you pass _POST variables from 1 server to another?

I have a web form on an IIS server (has no PHP). I have a PHP script on a LAMP server. My _POST var array is coming up empty on the LAMP server. My suspicion is I cannot pass POST vars from 1 server to another but I would like to have that confirmed. Does anyone know the answer to this? If that's the case then I know I need to with use ...

Why doesn't PHP appear to store my variables?

I have a page that allows the user to draw an image using HTML5 canvas, convert it into text with JavaScript and post it to a PHP page. http://dsiextensions.co.cc/chatdraw.php The page is quite confusing, each text box is for each line of to 100px X 100px canvas. To put the data in the boxes, click "Finish" and then click "Submit" (Sorr...

Is there a way to manually post to a rest webservice using a browser

Is there a way to manually post an xml to a webservice using a browser something like: POST http://url/Endpoint <xml file text> ...

What is this called? And how to achieve it?

I would like to make a WRITE A NEW POST page similar to ASP.NET or how to make a page similar to http://stackoverflow.com/questions/ask Please note, I do not want reference to already made controls like free rich text editor, etc. I would like to do the required coding myself. I would also like to know what is the name given to thi...

cascading dropdown value doesn't seem to get posted to my php page?

i am using cascading dropdownlist for showing states of a country... I get the country dropdown value but not the state dropdown value.... I am populating state values via ajax... echo $country = $this->input->post('country'); echo $state = $this->input->post('state'); When inspected through firebug it shows all the option values of...

PHP pass variable after form is submitted

I have a form that posts to process.php. Process.php send all the data to mysql then returns back to the page using: <?php header("Location: /campaigns"); ?> On the page it returns to I want to display a message saying form submitted. Can I post a variable to the Location: /campaigns. And use the variable to display the message (or mo...

HttpWebRequest response produces HTTP 422. Why?

Hi there. I'm trying to programmatically send a POST-request to a web-server in order to login an then perform other requests that require a login. This is my code: byte[] data = Encoding.UTF8.GetBytes( String.Format( "login={0}&password={1}&authenticity_token={2}" +"&login_submit=Entra&remember_me=1", ...

JSP doPost getAtribute null value

I want to pass value to servlet but I keep get null value. <jsp:useBean id="Helper" class="model.Registration" scope="request"/> <form action="/Project/Registration" method="post" enctype="multipart/form-data"> <input type="text" size="20" name="name" value="<%=Helper.getName()%>"> <input type="submit"> </form> protected void d...

Access values of a group of select boxes in php from post

Hi, I'm new to PHP, and I can't figure this out. I'm trying to figure out how to access the data of a group of select boxes I have defined in my HTML code. I tried grouping them as a class, but that doesn't seem to work... maybe I was doing it wrong. This is the following HTML code. <form action="" method="post"> <select class="foo">...

Why does Firefox + My code Destroys FireFox refresh

I am soo angry right now. I lost hours and i dont know why this happens. Its a semi rant but i'll try to keep it short My code would not work, even after refreshing it was broken I fixed my code or so i thought because it stops working without me changing anything (you would think i am imagining this...) I somehow decide to make a new ...

How to load and pass a Xforms form in Orbeon (How to Send instance to XForms) ?

Hi, I am using the Orbeon Forms solution to generate messages from filled-in web forms. I read different code snippetse in Orbeon's wiki on XForms submission from a pipeline, and I tried different solutions but it doesn't work, and there is no example with a POST from a pipeline, caught by a PFC and sent to an XForms view that receives...

Why should i POST data rather then GET?

I know you dont want to POST a form with a username and password where anyone could use the history to see or situations where repeat actions may not be desired (refreshing a page = adding an item to a cart may not be desired). So i have an understanding when i may want to use one over the other. But i could always have the server redire...