Jump to content

Mark82

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Mark82's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This example only has 3 checkboxes, but the principle is still the same: <?php require_once("dbFunctions.php"); dbConnect(); if(isset($_POST['Submit'])) { $name = $_POST['txtname']; $opt1 = $_POST['checkbox']; $opt2 = $_POST['checkbox2']; $opt3 = $_POST['checkbox3']; $query="INSERT INTO alloyd (name, option1, option2, option3) VALUES ('$name', '$opt1', '$opt2', '$opt3');"; $result = dbQuery($query); echo "Results Added!"; } ?>
  2. Hi I have a form with a series of 8 checkboxes. The user can select as many checkboxes as they wish (i.e. none or all . The values will be placed in a mysql databse. My problem is, if the user doesnt check a checkbox, the value isnt sent via POST and the error.... ERROR: UNDEFINED INDEX appears. Is there a method to have a default value, ro check whether it hasn't been checked etc? Any help appreicated, thanks. Mark
  3. Hi,  I have been trying to generate thumbnails automatically using a script form the net. I keep getting the error message "Call to undefined function imagecreatefromjpeg()" when I run the script. Im using PHP on localhost on ym own machine, using apache. I have Php 5.1 installed, and I've edited my php.ini file so that the php_gd2.dll is enabled. But when I run phpinfo I dont get anything on GD apart fomr right at the top where it says: "with-gd=shared"  next to the configure command row. Can anyone help me?  Have I dont something really stupid, not used GD before but form what Ive read Ive done everything to enable it, it comes bundled with my php version doesnt it? any help much appreicated!
  4. thanks, strangley enough I have just found that on another forum too! I guess help is like buses, wait forever and two come at once. thanks very much, that works fine.
  5. Hello I have a search engine script, which has used paging, and this works fine.  What I need is a snippet of code to display a message such as "no results found" if the query returns nothing.  I have tried several things, such as if's and using variables, but none of them work completly.  I am pretty OK with php but this has got me stuck. is there a very easy way to check is the '$row' is empty after doing the query (sample code below): $row=mysql_fetch_assoc($result); I am sorry fi this is confusing, if it is, please say! Im desperate for help! Thanks Mark
×
×
  • 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.