Jump to content

placing results of a php script into a specfic table on the webpage!


marbles

Recommended Posts

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.