Reply to print "..." question

Your name:

Reply:


Posted by Steff on 03/19/06 16:00

I am wandering if my code is making sense... I use a lot the print function.
Is it weird in this case where I have to display an array ? I thought it
would be better to have the entire array in php but now I am not sure if
that makes sense. Can you tell me please ?


<html>

<head>

<link href="../withStyle.css" rel="stylesheet" type="text/css">

<title>Reporting System Demand Management</title>
</head>

<body>


<center><h1>Add request</h1></p></center>
<hr>

<p align="center">
&nbsp;

<?php

print "<form ACTION='..' method='POST'>";
print "<table border='1' width='45%'>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Request Name</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'>
<p align='left'><input type='text' size='40'
name='request_name'><img src='requis.gif' width='15' height='15'></p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Request Date</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'>";
print "<p align='left'>";
print "<select name='day'>";
print "<option selected>dd</option>";
print "<option>01</option>";
print "<option>02</option>";
print "<option>03</option>";
print "<option>04</option>";
print "<option>05</option>";
print "<option>06</option>";
print "<option>07</option>";
print "<option>08</option>";
print "<option>09</option>";
print "<option>10</option>";
print "<option>11</option>";
print "<option>12</option>";
print "<option>13</option>";
print "<option>14</option>";
print "<option>15</option>";
print "<option>16</option>";
print "<option>17</option>";
print "<option>18</option>";
print "<option>19</option>";
print "<option>20</option>";
print "<option>21</option>";
print "<option>22</option>";
print "<option>23</option>";
print "<option>24</option>";
print "<option>25</option>";
print "<option>26</option>";
print "<option>27</option>";
print "<option>28</option>";
print "<option>29</option>";
print "<option>30</option>";
print "<option>31</option>";
print "</select>";
print "<select name='month'>";
print "<option selected>mm</option>";
print "<option>01</option>";
print "<option>02</option>";
print "<option>03</option>";
print "<option>04</option>";
print "<option>05</option>";
print "<option>06</option>";
print "<option>07</option>";
print "<option>08</option>";
print "<option>09</option>";
print "<option>10</option>";
print "<option>11</option>";
print "<option>12</option>";
print "</select>";
print "<select name='year'>";
print "<option selected>aaaa</option>";
print "<option>2006</option>";
print "<option>2007</option>";
print "<option>2008</option>";
print "<option>2009</option>";
print "<option>2010</option>";
print "<option>2011</option>";
print "<option>2012</option>";
print "<option>2013</option>";
print "<option>2014</option>";
print "<option>2015</option>";
print "<option>2016</option>";
print "<option>2017</option>";
print "<option>2018</option>";
print "<option>2019</option>";
print "<option>2020</option>";
print "</select><img src='requis.gif' width='15' height='15'>";
print "</p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Client Name</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'>";
print "<p align='left'>";
print "<select name='Client_name' size='1'>";
print "<option>Name</option>";

//connexion
$c1=oci_connect("stephane","Stef1975",$bdtest05);

$query="select client_firstname||' '||client_lastname as client_fullname
from clients";

$stmt=oci_parse($c1,$query);

oci_execute($stmt);

while ($row = oci_fetch_array($stmt,OCI_NUM))
{
print "<option>";
echo $row[0];
print "</option>";
}

oci_free_statement($stmt);



print "</select><img src='requis.gif' width='15' height='15'></p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Request Type</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'>";
print "<p align='left'>";
print "<select name='Request Type' size='1'>";
print "<option>Request Type</option>";

$query="select request_type_name from request_types";

$stmt=oci_parse($c1,$query);

oci_execute($stmt);

while ($row = oci_fetch_array($stmt,OCI_NUM))
{
print "<option>";
echo $row[0];
print "</option>";
}

oci_free_statement($stmt);


print "</select><img src='requis.gif' width='15' height='15'>";
print "</p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Client Departement</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'>";
print "<p align='left'>";
print "<select name='Department' size='1'>";
print "<option>Departement</option>";

$query="select department_name from departments";

$stmt=oci_parse($c1,$query);

oci_execute($stmt);

while ($row = oci_fetch_array($stmt,OCI_NUM))
{
print "<option>";
echo $row[0];
print "</option>";
}

oci_free_statement($stmt);

print "</select>";
print "</p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Expected Delivery Date</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'>";
print "<p align='left'>";
print "<select name='day'>";
print "<option selected>dd</option>";
print "<option>01</option>";
print "<option>02</option>";
print "<option>03</option>";
print "<option>04</option>";
print "<option>05</option>";
print "<option>06</option>";
print "<option>07</option>";
print "<option>08</option>";
print "<option>09</option>";
print "<option>10</option>";
print "<option>11</option>";
print "<option>12</option>";
print "<option>13</option>";
print "<option>14</option>";
print "<option>15</option>";
print "<option>16</option>";
print "<option>17</option>";
print "<option>18</option>";
print "<option>19</option>";
print "<option>20</option>";
print "<option>21</option>";
print "<option>22</option>";
print "<option>23</option>";
print "<option>24</option>";
print "<option>25</option>";
print "<option>26</option>";
print "<option>27</option>";
print "<option>28</option>";
print "<option>29</option>";
print "<option>30</option>";
print "<option>31</option>";
print"</select>";
print "<select name='month'>";
print "<option selected>mm</option>";
print "<option>01</option>";
print "<option>02</option>";
print "<option>03</option>";
print "<option>04</option>";
print "<option>05</option>";
print "<option>06</option>";
print "<option>07</option>";
print "<option>08</option>";
print "<option>09</option>";
print "<option>10</option>";
print "<option>11</option>";
print "<option>12</option>";
print "</select>";
print "<select name='year'>";
print "<option selected>aaaa</option>";
print "<option>2006</option>";
print "<option>2007</option>";
print "<option>2008</option>";
print "<option>2009</option>";
print "<option>2010</option>";
print "<option>2011</option>";
print "<option>2012</option>";
print "<option>2013</option>";
print "<option>2014</option>";
print "<option>2015</option>";
print "<option>2016</option>";
print "<option>2017</option>";
print "<option>2018</option>";
print "<option>2019</option>";
print "<option>2020</option>";
print "</select>";
print "</p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'>Comment on Request</p>";
print "</td>";
print "<td align='left' width='50%' height='25' colspan='2'><textarea
name=comment cols=30 rows=2></textarea><p>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td align='left' width='50%' height='25'>";
print "<p align='left'></td>";
print "<td align='left' width='25%' height='25'>";
print "<p align='left'><input type='submit' name='addButton'
value='Add Request'>";
print "</p>";
print "</td>";
print "<td align='left' width='25%' height='25'>";
print "<input type='reset' name='resetButton' value='Reset'>";
print "</td>";
print "</tr>";
print "</table>";
print "</form>";

//close connexion
oci_close($c1);

?>

<p align="left"></p>
<hr>


<p align="center"><a href="index.htm">[Home]</a></p>


</body>

</html>

// thanks for looking!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация