note 63397 added to faq.html

From: Date: Wed, 22 Mar 2006 01:25:41 +0000
Subject: note 63397 added to faq.html
Groups: php.notes 
Request: Send a blank email to php-notes+get-106189@lists.php.net to get a copy of this message
I don't know how to post oracledata from form to php program. for example: I want to input date in form and let the date to php program and maybe we will use $_post[] . And how to use $_post[] in (select * from table where a = $_post[])? form: <form action="example_10.php" method="POST"> Your name: <input type="text" name="beg_date" /> Your age: <input type="text" name="end_date" /> <input type="submit"> </form> php: example_10.php <?php /* oci_fetch_all example mbritton at verinet dot com (990624) */ $conn = oci_connect("apps", "apps","prod"); $stmt = oci_parse($conn, " select * from fnd_user where to_char(f.creation_date,'YYYYMMDD') between beg_date and end_date "); oci_execute($stmt); $nrows = oci_fetch_all($stmt, $results); if ($nrows > 0) { echo "<table border=\"1\" width='200%'>\n"; echo "<caption><b>应收明细表</b></caption>"; echo "<tr>\n"; foreach ($results as $key => $val) { echo "<th>$key</th>\n"; } echo "</tr>\n"; for ($i = 0; $i < $nrows; $i++) { echo "<tr>\n"; foreach ($results as $data) { echo "<td>$data[$i]&nbsp</td>\n"; } echo "</tr>\n"; } echo "</table>\n"; } else { echo "No data found<br />\n"; } echo "$nrows Records Selected<br />\n"; oci_free_statement($stmt); oci_close($conn); oci_commit($conn); ?> how to use $_post[] in form and in php program ? ---- Server IP: 66.163.161.117 Probable Submitter: 218.3.167.90 ---- X-Spam-Status: No, hits=4.0 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_50_60,HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/faq.html.php Edit -- http://master.php.net/note/edit/63397 Del: integrated -- http://master.php.net/note/delete/63397/integrated Del: useless -- http://master.php.net/note/delete/63397/useless Del: bad code -- http://master.php.net/note/delete/63397/bad+code Del: spam -- http://master.php.net/note/delete/63397/spam Del: non-english -- http://master.php.net/note/delete/63397/non-english Del: in docs -- http://master.php.net/note/delete/63397/in+docs Del: other reasons-- http://master.php.net/note/delete/63397 Reject -- http://master.php.net/note/reject/63397 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106189) next »