Jump to content

Accurax

Members
  • Posts

    246
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Accurax's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. i ant im afraid ..... this needs to happen automatically .... looks like i may have to figure it out myself.... really appreciate the help though guys
  2. bump... could really do with some more input on this if anypne has a few moments to spare thanks in advance
  3. this shouldnt be this difficult surley .... its still doesnt work.... heres the conditional imusing to check if the form is submitted: <?php if(isset($_POST['prescription'])){ echo "waaaahey"; } ?> ive tried this before and after the while loop and to no avail... i just dont know whats wrong sorry to keep pestering but i really am stumped
  4. $row['title'] gets set just before the form starts heres the complete code... including the loop im using: <?php $id = $_SESSION['customer_id']; $query = "SELECT * FROM mytable WHERE customers_id='$id'"; $result = mysql_query($query) or die ("could not find name"); echo "<table id=\"pres_box\" cellpadding=\"0\" cellmargin=\"0\">"; echo "<form method='post' action='" . $self . "'>"; echo "<tr>"; echo "<td colspan=\"2\" class=\"title\">"; echo "Select your option"; echo "</td>"; echo "</tr>"; while ($row=mysql_fetch_array($result)) { echo "<tr>"; echo "<td>"; echo $row['title']; echo "</td>"; echo "<td>"; echo "<input type=radio name='myform' value='" . $row['title'] . "' onChange='this.form.submit();'>"; echo "</td>"; echo "</tr>"; } echo "</form>"; echo "</table>"; ?> how would i go about ending and restarting the while loop... as you can see i need a radio button for each entry in the database... this could be anything from 1 - 100
  5. Here's some code that works correctly... tyhere are clear differences, but maybe someone will spot something i've missed <?php if(isset($_POST['myform'])){ echo "waaaahey"; } ?> <form method="post"> <input type=radio name='myform' value='test' onchange='this.form.submit()'> </form> As you can see when the form and onChange even are outside of the php then it works correctly..... problem is i need to produce my radio buttons via a while loop, so that isnt an option
  6. Doesnt seem to make any difference.... the form looks like its submitting... the page refreshes, but my conditional never seems to hold true ....
  7. Hmmm ... that doesnt seem to help my friend.... <?php if(isset($_POST['myform'])){ echo "form submitted"; } echo "<form method='post'>"; echo "<input type=radio name='myform' value='" . $row['title'] . "' onchange='this.form.submit();'>"; echo "</form>"; ?>
  8. Hi chaps... Ok i have the following form... which self submits when a user selects one of the many radio buttons. <?php if(isset($_POST['myform'])){ echo "form submitted"; } echo "<form method='post' action='" . $self . "'>"; echo "<input type=radio name='myform' value='" . $row['title'] . "' onchange='this.form.submit();'>"; echo "</form>"; ?> I need to get this submitted form value into a session somehow.... but at the moment i cant seem to make the page accept the form was submitted. I was hoping someone may be able to point me in the right direction to gettng this working? ... i think it may have something to do with the way the page is processed ie.. php on the server JS on the client.... its a strange old problem ... any and all advice seriously appreciate d!! Accy
  9. lol... its ok i was being a muppet .... must be this cold ive got ... im about to post a thread to do with the "real" issue here... this however is solved in itself... thanks for those who took the time to look hmmm cant seem to see the "mark as solved" option
  10. Hi guys, Been a while since ive written much php... and i think this may be a dense question ... but.. i cant seem to make a javascript onclick event fire when its echo'd out inside a php statement.. see below: echo "<form method='post' action='" . $self . "'>"; echo "<input type=radio name='radio' value='" . $row['pres_title'] . "' onchange='this.form.submit()'>"; echo "</form>"; this works when its just in an html page... but i cant for the life of me seem to make it fire as is shown above ... can anyone shed any light on this please? thanks in advance Accy
  11. Hi guys, I hope this is a simple question.... i just cant find the answer atm. I have a set of cash vluse calculated from a base price and a percentage discount. Now, when this comes out at lets say 12.995 I would like to round this to 12.99 and not 13 as im currently getting .... is there any way of doing this? Really appreciate any help you can give
  12. Fine in principle .... but when you begin to talk about high traffic sites those extra database requests become much more of a problem.
  13. Must be the ammount of beer I drank last nigh, because i keep making silly mistakes that take hours to figure out. ive got it
×
×
  • 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.