Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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 ,...
    2. 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...
    3. 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...
    4. #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...
    5. 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...
  3. #2

    Default Re: php problem

    solved. I forgot to echo the variables into the hidden field.


    //snkhan Guest

  4. #3

    Default 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&uuml;&uuml;: </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&otilde;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="&nbsp;Telli&nbsp;"><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

  5. #4

    Default Re: php problem

    Can anyone help me!!!

    mio36 Guest

  6. #5

    Default 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

  7. #6

    Default Re: php problem

    Thanks very much Ross

    Mihkel
    mio36 Guest

  8. #7

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139