CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 auto submit the forum

Print topic Send  topic

Author Message
cwp

Posts: 7
Posted: 12/08/2011, 6:52 PM

I tried to do some php coding to retrieve contents from a mail server. subsequently, i set values into a form (Record Builder). I would like to auto submit that form.

after I have setValues ($FORM_NAME->TEXTFIELD->SetValue($content);) I would like to trigger the submit button. Could someone tell me how do i trigger the submit button using php?

thank you!
View profile  Send private message
ckroon

Posts: 869
Posted: 12/08/2011, 10:02 PM

Are the fields on the record page that a user will be filling in prior to the form being submitted?

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
cwp

Posts: 7
Posted: 12/08/2011, 10:08 PM

yes. they are populated with values. But i do not want to click on the "submit" button manually.

I tried to do the following, but it does not seem to trigger the submission of form. How does codecharge submits the form?

$post_data['CLOB_COL'] = "abc";
$post_data['ID'] = 101;
$post_data['PROCESSED'] = 0;
$post_data['Button_Insert'] = "Add";
$post_data['ccsForm'] = "MAIL_STAGING";

//traverse array and prepare data for posting (key1=value1)
foreach ( $post_data as $key => $value) {
$post_items[] = $key . '=' . $value;
}

//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);

//we also need to add a question mark at the beginning of the string
$post_string = '?' . $post_string;

//we are going to need the length of the data string
$data_length = strlen($post_string);

//let's open the connection
$connection = fsockopen('www.mydomain.com', 80);

//sending the data
fputs($connection, "POST /page_two.php?ccsForm=MAIL_STAGING HTTP/1.1\r\n");
fputs($connection, "Host: www.mydomain.com\r\n");
fputs($connection, "Content-Type: application/x-www-form-urlencoded\r\n");
fputs($connection, "Content-Length: $data_length\r\n");
fputs($connection, "Connection: close\r\n\r\n");
fputs($connection, $post_string);
//closing the connection
fclose($connection);
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.