Jump to content

tylercaiden

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tylercaiden's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I thank you for your reply but I am not sure if this completely solves my problem. <get name="name"> returns data that I would like to run a MySQL query on. Make sense?
  2. This is an SMS app i have started building yesterday. I really don't know much about CGI and XML but I am pretty decent with PHP. I am just testing on one of my servers but plan to use this with my MSSQL appointment database for techs to get their service calls. My server will read PHP in a XML document and this is really a PHP file but the required file name is just sent to a PHP doc from mod_rewrite. <?xml version="1.0" encoding="UTF-8" ?> <cmrl xmlns:dotgo="http://dotgo.com/cmrl/1.0"> <match pattern="*"> <message> <content>Reply with your user name</content> <input name="name"> <message> <content><?php header('Content-Type: text/xml'); $string = <<<XML <get name="name"/> XML; $xml = simplexml_load_string($string); var_dump($xml); $conn = mysql_connect("localhost", "x", "x"); $db = mysql_select_db("db"); $queryl = "SELECT * FROM user where user = '$xml'"; $resultl = mysql_query($queryl, $conn); while($row = mysql_fetch_array($resultl)) { $myname = $row['name']; echo $myname; } ?>Thanks <get name="name"/> </content> </message> </input> </message> </match> </cmrl> This is one of the attempts I have made to get this working. The tech sends a message with their user name and it returns data from MySQL. <get name="name"/> is the user name and it does return a text message with "Thanks name". I just need the PHP to be able to get the data from <get name="name"/> in the same document. http://dotgo.com is the only place I know of using this CMRL coding. I check their documentation for it but they show examples using CGI and XML alone.
  3. im not sure, but it doesn't look like this code does write. i need it to right the data from the form to a text file first and send it, not attach a file from the users machine.
  4. Hi everyone, i need my web form to send the info submitted as a txt file and not just an email... here is my current code... <?php $email = $_REQUEST['email'] ; $zip = $_REQUEST['zip'] ; $name = $_REQUEST['name'] ; $phone = $_REQUEST['phone'] ; $order1 = $_REQUEST['RadioGroup1'] ; mail( "email@domain.com", "subject line", "$order1\n $zip\n $name\n $email\n $phone\n", "From: x@domain.com" ); header( "Location: thankyou.html" ); ?> anyone know of a way to do this? i guess i need it to write the form as a txt on the server then attach it to an email with a subject line.
  5. i think im doing this wrong, sorry im very new to php... i tried setting it up like this thinking it will print all rows greater than 0 but it only prints one row $query = "select * from user ORDER BY `Points` DESC"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) if ($row['Points'] > 0) { $Html_Listp = "<table width='84%' border='0' align='center' cellpadding='2' cellspacing='0'> <tr> <td width='4%'><input name='CHECKID' type='checkbox' class='title_list1' value='$id'></td> <td width='32%' class='title_list'>{$row['name']}</td> <td width='26%' class='title_list'>{$row['user']}</td> <td width='24%' class='title_list'>{$row['Points']}</td> <td width='14%' class='title_list'>{$row['id']}</td> </tr> </table>"; }
  6. Hi! I would like to hide the rows where the "points" column is empty. I am ordering by points desc and half the users do not have points. $query = "select * from user ORDER BY `Points` DESC"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $Html_Listp = $Html_Listp."<table width='84%' border='0' align='center' cellpadding='2' cellspacing='0'> <tr> <td width='4%'><input name='CHECKID' type='checkbox' class='title_list1' value='$id'></td> <td width='32%' class='title_list'>{$row['name']}</td> <td width='26%' class='title_list'>{$row['user']}</td> <td width='24%' class='title_list'>{$row['Points']}</td> <td width='14%' class='title_list'>{$row['id']}</td> </tr> </table>";
×
×
  • 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.