Ask a Question related to Dreamweaver AppDev, Design and Development.
-
//snkhan #1
php problem
Hi,
I am trying to make a online prescription form for doctors to submit
prescriptions directly to pharmacies.
On page one I have the following text fields
patient_name
patient_address
etc....
when this form is submitted the doctor is taken to a second page where all
the fields above are echoed into the top part of the page. Here is the
command I am using;
<?php echo "$patient_name" ?>
this command seems to be working well.
On the same page the doctor has to enter the patients medication into a
separate textfield called medic.
On the same page I have got hidden fields containing information like this;
<input name="patient_name" type="hidden" value="<?php $patient_name ?>">
this is so that when this page is submitted to rx.php, (which looks like a
prescription form), I can place these values where I want. However using
this command;
<?php echo "$patient_name"; ?>
does not seem to be working.
Any ideas guys?
saj
--
[url]www.snkhan.co.uk[/url]
[url]www.thekhans.me.uk[/url]
//snkhan Guest
-
contribute problem - access denied file may not existpermission problem
Recieving the following error message - "access denied file may not exist , or there could be a permission problem" this happened this morning ,... -
Problem playing Quicktime thru .DCR embedded in HTML - pathreferencing problem?
Greetings earthlings and Director heads. Here's the problem: created an HTML file containing shockwave (dcr) movie that calls quicktime movies in... -
Uploading problem = weird warning (was: access denied problem.....)
Hi, I had a problem where my upload form was not working on our production server but was working on two other servers, after checking the... -
#21611 [Opn]: Problem with version_compare() (Was: Problem with pear cli and release numbers)
ID: 21611 Updated by: et@php.net -Summary: Problem with pear cli and release numbers Reported By: jan at horde... -
Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I... -
//snkhan #2
Re: php problem
solved. I forgot to echo the variables into the hidden field.
//snkhan Guest
-
mio36 #3
php problem
hello!
I'm new in php and can anyone help me on this problem
I cat this message:
Warning: Variable passed to each() is not an array or object
and my html code is:
<form name="menyy" method="post" action="menyy.php">
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="tellija">
<tr class="style1">
<td width="107" align="left" valign="middle">*Vali
menüü: </td>
<td width="168" align="left" valign="middle"><select
name="ValiMenyy" class="style1" id="ValiMenyy">
<option selected> </option>
<option value="golf 1">Golf 1</option>
<option value="golf 2">Golf 2</option>
<option value="golf 3">Golf 3</option>
<option value="golf 4">Golf 4</option>
<option value="golf 5">Golf 5</option>
<option value="golf 6">Golf 6</option>
<option value="taimetoitlastele">Taimetoitlastele</option>
</select></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">*Toimumise aeg: </td>
<td align="left" valign="middle"><input name="ToimumiseAeg"
type="text" id="ToimumiseAeg"></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">Toimumise koht: </td>
<td align="left" valign="middle"><input name="ToimumiseKoht"
type="text" id="ToimumiseKoht"></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">Inimeste arv: </td>
<td align="left" valign="middle"><input name="InimesteArv"
type="text"></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">Ettevõtte nimi: </td>
<td align="left" valign="middle"><input name="EttevotteNimi"
type="text"></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">*Kontakt isik: </td>
<td align="left" valign="middle"><input name="KontaktIsik"
type="text"></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">*E-mail:</td>
<td align="left" valign="middle"><input name="Email"
type="text"></td>
</tr>
<tr class="style1">
<td align="left" valign="middle">*Telefon:</td>
<td align="left" valign="middle"><input name="Telefon"
type="text"></td>
</tr>
<tr class="style1">
<td align="left" valign="top">Lisainfo:</td>
<td align="left" valign="middle"><textarea name="LisaInfo"
cols="30" rows="4" wrap="VIRTUAL" id="LisaInfo"></textarea></td>
</tr>
<tr class="style1">
<td align="right" valign="middle"></td>
<td valign="middle"><input name="GrupiMenyy" type="submit"
class="inputbutton" id="GrupiMenyy" value=" Telli "><input
name="Reset" type="reset" class="inputbutton" value="Puhasta"></td>
</tr>
</table>
</form>
and php code:
$ValiMenyy = $_POST["ValiMenyy"];
$ToimumiseAeg = $_POST["ToimumiseAeg"];
$ToimumiseKoht = $_POST["ToimumiseKoht"];
$InimesteArv = $_POST["InimesteArv"];
$EttevotteNimi = $_POST["EttevotteNimi"];
$KontaktIsik = $_POST["KontaktIsik"];
$Email = $_POST["Email"];
$Telefon = $_POST["Telefon"];
$LisaInfo = $_POST["LisaInfo"];
while(list($key,$val)=each($ValiMenyy)){
$print_array.=$val.=' ';
}
$kiri="Menyy valik:$print_array\nToimumise aeg:$ToimumiseAeg\nToimumise
koht:$ToimumiseKoht\nInimeste arv:$InimesteArv\n
Ettevotte nimi:$EttevotteNimi\nKontakt
isik:$KontaktIsik\nE-mail:$Email\nTelefon:$Telefon\nLisainfo:$LisaInfo" ;
mail("mio36@hot.ee", "KoduleheMenyyTellimine", $kiri,
"From: $KontaktIsik<$Email>\nReply-To: $mail\nX-Mailer: PHP/" . phpversion());
}
Thanks, Mihkel
mio36 Guest
-
-
Ross Riley #5
Re: php problem
Yes the select menu 'ValiMenyy' passes a single variable and you are trying to
use an each command which is for processing arrays. Remove the line
while(list($key,$val)=each($ValiMenyy)){ $print_array.=$val.=' '; } and access
the variable using $ValiMenyy instead of $print_array
Ross Riley Guest
-
-
Leao16 #7
PHP problem
I put a message board on my site (see
[url]http://www.wastingtimewithgod.com/simeon/sites/blog.html[/url]). For some reason the
submit.php file has become corrupted recently and it's no longer possible to
send messages.
I have attached the php code to this message, do you know what's the problem?
thanks,
Leo
<head>
<META HTTP-EQUIV="Refresh"
CONTENT="5; URL=blog.html">
</head>
<?
$subject = $_POST['email'];
mail("wastingtimewithgod.guest@blogger.com", $subject, "$email\n$message",
"From: simeon <simeon@wastingtimewithgod.com>");
Leao16 Guest



Reply With Quote

