Jump to content

supergrover1981

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

supergrover1981's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. *grin* Cheers Btherl, I was trying a JavaScript onLoad call that wasn't working - forgot about the fact that my form was inside a small iFrame. JavaScript worked a treat once I realised the mistake. :-) Cheers,           - JB
  2. Hi Guys, I'm currently having a problem with a GET submission. If anyone has any suggestions I'd be most appreciative. Here's the problem: I'm working on a site which, on the front page, has a hidden input field declared with value="any". This value can be changed by a javascript call of onclick="basicsearch.primarycolour.value='xyz'" The form works fine, but if I go back to the same submission page (even after pressing refresh) without first shutting down the browser, it posts the remembered value of the hidden form, NOT the default value set in the (input name=xyz value="any") html. If I click on a javascript button which sets a different value via onClick it posts the new value, but unless i do that, the page seems to ignore the value set in the input field. A few things: - My PHP includes no session variables - The screen with the form in it does not receive any _GET/_POST variables from other pages - No cookies set in my PHP If anyone has any idea on how to make these pesky forms "forget" the previous submission, I really would be most appreciative - it's doing my head in. :-)
  3. Hi PhpFreaks, I'm currently trying to create a php form which includes a select box from which a user can select multiple values. The only things is, I'm not really sure how HTML forms post multiple select values, or how to interpret them in PHP. The good old: [code]$multipleselect = ($_GET['selectbox']) echo $multiple select; [/code] brings up no value. In the URL, it reads http://www......../testingmultipleforminputs.php?multipleselect=a&multipleselect=b Ideally, I'm hoping to separate each selected item by a comma, and then explode the resulting string into a php array. Any ideas sincerely appreciated. Cheers,         - JB
  4. Hi Guys, I've been using pear on my local machine for the last two weeks or so without any problems - I've just tried to migrate some stuff to a remote (shared) server for the first time, and I'm having a bit of a problem. I'm trying to connect via MDB2, using the following: [code]         $connection = MDB2::connect("mysql://$db_username:$db_password@$db_host/$db_database");         if (MDB2::isError($connection)) {         die ("Could not connect to the database: <br />".MDB2::errorMessage($connection));     }     ?> [/code] which is always met with the dreaded: "Could not connect to the database: not found" error. However: - I can connect using the same login details via the non-pear mysql_connect call - I can connect via MDB2 on my local machine using the same mdb2 code - I've looked via pear remote-list and MDB2 is installed on the remote machine Any suggestions would be really, truly appreciated - I'm quite stumped. Connection code attached below. :-) Many thanks, - JB [code]     php:$db_username='tempscou_testconn';     $db_password='conntest';     $db_host='localhost';     $db_database='tempscou_jts';     require_once('MDB2.php');     $connection = MDB2::connect("mysql://$db_username:$db_password@$db_host/$db_database");         if (MDB2::isError($connection)) {         die ("FROG1Could not connect to the database: <br />".MDB2::errorMessage($connection));     }     ?> [/code]
  5. *grin* Hi Akitchin - thanks for the quick response. :-) Yes, you're right - I'd like to send input values to paypal directly from the form that their quantities are input on. The difficult part is that I only want to send input values that satisfy a conditional, so instead of just outputting the form to paypal, I need to: 1.) Take the variable entered into the form and evaluate it 2.) If the variable satisfies a condition, send that variable to paypal I can do this over 2 forms via the "post" command, but ideally I'd like to do it from just the single form. Any help most appreciated. :-) Cheers,         - JB
  6. Gidday guys, I'm trying to write a php script that takes the values from text input fields, and if the values are over a certain quantity, posts them as hidden variables to a 3rd-party site. Sample of the current code looks like this: [code] <?php         $prodlistcount = 0; $hicarbqty = htmlentities($_POST['hicarbqty']);   $hiefiqty = htmlentities($_POST['hiefiqty']); ?> ... <?php if ($hicarbqty > 0) { $prodlistcount++; echo "<input type='hidden' name='item_name_$prodlistcount' value='Hiclone Fuel Efficiency Device'> ;} if ($hiefiqty > 0) { $prodlistcount++; echo "<input type='hidden' name='item_name_$prodlistcount' value='HiClone (For EFI)'> ;} ?> [/code] What I would like to do is take input values *from the same page* as this PHP, instead of posting it from the prior page. Does anyone know if/how this can be done? Any help would be very appreciated. Lotsa thanks gang,                         - JB
×
×
  • 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.