marbles Posted April 8, 2007 Share Posted April 8, 2007 Hi everyone, i've been trying for a couple of days to place the results of a php script on a specific area on my webpage ie a table, to make it neat. the code is as follows: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <?php //first get the variables from the form $userselectednums = $_REQUEST['userselectednums']; $usermessage = $_REQUEST['usermessage']; //set up variables $info = "1"; $address = "www.txtlocal.com/sendsmspost.php"; $message = $usermessage; $from = "watersideCU"; $uname = "MY USERNAME HERE"; $pword = "MY PASSWORD HERE"; $selectednums = $userselectednums; //build url $data = "uname=" . $uname . "&pword=" . $pword . "&message=" . $message . "&from=" . $from . "&selectednums=" . $selectednums . "&info=" . $info; //send messages $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://$address"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_exec ($ch); curl_close ($ch); ?> <body> </body> </html> When i place the code in the body so it will display results there it won't work! Anyone got any Ideas? Link to comment https://forums.phpfreaks.com/topic/46177-placing-results-of-a-php-script-into-a-specfic-table-on-the-webpage/ Share on other sites More sharing options...
Zaid Posted April 8, 2007 Share Posted April 8, 2007 i'm not really sure why you using $_REQUEST i can't see your form so i dunno if you are using POST or GET method for POST use $_POST['userselectednums']; for GET use $_GET['userselectednums']; Link to comment https://forums.phpfreaks.com/topic/46177-placing-results-of-a-php-script-into-a-specfic-table-on-the-webpage/#findComment-224463 Share on other sites More sharing options...
marbles Posted April 8, 2007 Author Share Posted April 8, 2007 i'm using $request because i'm requesting the form details from a different page, a .htm page, the code works fine and displays the results on the php page but i just dont know how to place the results in a table without upsetting the php code. Link to comment https://forums.phpfreaks.com/topic/46177-placing-results-of-a-php-script-into-a-specfic-table-on-the-webpage/#findComment-224466 Share on other sites More sharing options...
marbles Posted April 8, 2007 Author Share Posted April 8, 2007 anyone got any ideas? Link to comment https://forums.phpfreaks.com/topic/46177-placing-results-of-a-php-script-into-a-specfic-table-on-the-webpage/#findComment-224478 Share on other sites More sharing options...
marbles Posted April 9, 2007 Author Share Posted April 9, 2007 can anyone help? Please Please Please! Link to comment https://forums.phpfreaks.com/topic/46177-placing-results-of-a-php-script-into-a-specfic-table-on-the-webpage/#findComment-224593 Share on other sites More sharing options...
clown[NOR] Posted April 9, 2007 Share Posted April 9, 2007 maybe adding the html code into echo? Link to comment https://forums.phpfreaks.com/topic/46177-placing-results-of-a-php-script-into-a-specfic-table-on-the-webpage/#findComment-224596 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.