Jump to content

sodascape

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sodascape's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. no, advanced pHp shows you how to accomplish this without editing the php.ini . . . but i can't get it to work
  2. I'm trying to create a session without a cookie (using PHPID)... I can't find a descent tutorial anywhere, I just need to know how to create it... simply... without the BS... and without Objects. Please help!
  3. I'm trying to put together a small download cart... downloading certain files after purchase. I am trying to stear away from having people sign up for a membership, I just want them to be able to come to the site, select what items they want to purchase and take them directly to the checkout page... but I want to have the "Add to Cart" option, so obviously, I want to create a cart. What's the best way? 1) Sessions w/cookies = obviously the easiest route, but not as dependable using cookies. 2) Sessions without cookies... havne't done it before, wondering if it is worth the effort. 3) Just add the shit to a database and remove it after they check out. THanks! Brad
  4. [b]What is wrong with this script?  It keeps spitting out, "Your File Could NOt Be Uplaoded Because:     [/b] [code] <?php // IMAGE UPLOAD FUNCTION function createThumbnail($imageDirectory, $imageName, $thumbDirectory, $thumbWidth) { $srcImg = imagecreatefromjpeg("$imageDirectory/$imageName"); $origWidth = imagesx($srcImg); $origHeight = imagesy($srcImg); $ratio = $thumbWidth / $origWidth; $thumbHeight = $origHeight * $ratio; $thumbImg = imagecreatetruecolor($thumbWidth, $thumbHeight); imagecopyresampled($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $origWidth, $origHeight); imagejpeg($thumbImg, "$thumbDirectory/$imageName"); } // END IMAGE UPLOAD FUNCTION $done = 'false'; if (isset($_POST['upload'])) { // IMAGE UPLOAD if (move_uploaded_file ($_FILES['picture1']['tmp_name'], "picpost/{$_FILES['picture1']['name']}")) { } else { echo '<p>Your file could not be uploaded because:</p>'; switch ($_FILES['picture1']['error']) { case 1: echo 'Your file is bigger than what the server can hold!'; break; case 2: echo 'Your file is too big!'; break; case 3: echo 'Only part of the file was uploaded!'; break; case 4: echo 'No file was uploaded.'; break; } exit(); }// End If Move Uploaded File $fileName = $_FILES['picture1']['name'];     if(!get_magic_quotes_gpc()) {            $fileName = addslashes($fileName);     } // end get_magic_quotes_gpc // CALL THE FUNCTION TO CREATE THUMBNAIL createThumbnail("picpost", "$fileName", "picpost/thumbs", 100); $done = 'true'; } // END OF THE IMAGE UPLOAD ?> <form method="post" action="upload.php"> <input type="file" name="picture1" /> <input type="submit" name="upload" /> </form>[/code]
  5. [code]Array ( [0] => red.jpg [1] => green.jpg [2] => blue.jpg )[/code] THAT'S WHAT I GET WHEN I PRINT_R THE ARRAY [code]Array ( [0] => red.jpg [1] => green.jpg [2] => blue.jpg )[/code] THAT'S THE RESPONSE I GET WHEN I PRINT_R THE SESSION. EVERYTHING SEEMS TO BE passing fine.
  6. Thank you, I'm an idiot and had the wrong table.....  I got it working........HOWEVER, I am still having a problemw with another posting I made, it's called ARRAYS and SESSIONS.... if you could check that one out, it'd be greatly appreciated.
  7. Anyone have any idea?  This is driving me nuts!?!?!
  8. I've checked, everything is the same: [code] $doquery = "INSERT INTO customers (id, username, password, newuser, email, fullname, birthday, city, state, zip, country) VALUES ('0', '$username', '$password', '0', '$email', '$fullname', '$birthday', '$city', '$state', '$zip', '$country')"; $doit = mysql_query($doquery); [/code]
  9. double checked, everything matches, there is a password field in the database and on the INSERT query ... they match, what else could it be?
  10. Anybody know what that means? Unknown column 'password' in 'field list'
  11. The input tag from the form: [code] <input type="checkbox" name="store[]" value="blue" /> <input type="checkbox" name="store[]" value="red" /> <input type="checkbox" name="store[]" value="green" /> [/code] Turning the array into a session [code] // TURNING THE ARRAY INTO A SESSION $_SESSION['bag'] = $_POST['store']; [/code] PUTTING THIS INTO THE DATABASE WITH OTHER VARIABLES NOT IN THE ARRAY [code] // UPLOAD THIS SHTuff TO THE DATABASE STORE mysql_connect('localhost','stickys_stsp','stsp'); mysql_select_db( 'stickys_vbase' ); // DUMP ARRAY OUT OF SESSION foreach ($_SESSION['bag'] as $bag) { echo '<td align="center"><img src="setcaps/'.$bag.'" border="1" alt="" /></td>'; $storebag = "INSERT INTO store (id, username, setcap, today, expires, key) VALUES (0, $user, $bag, 0, 0, $key)"; // Display Results $bagr = mysql_query ($storebag); } // end foreach [/code]
  12. I'm having issues getting all of the variables of an array into a session, I put four or five things in, save it to a session and it only prints out the first one when I call it.  What is the best way to fix this?
  13. A form on one page, with a bunch of CHECKBOX items, all of the selected CHECKBOX items are added to an array via the form......and then the ARRAY is sent to another page and on that page, the items of the array are displayed. EXAMPLE:  Page 1 has "select colors"  I pick out RED, GREEN and BLUE.... then I click the SUBMIT button and it takes me to the next page, and on Page 2 it says "You have selected the colors: RED GREEN AND BLUE.  Make sense?
  14. Is that going to pass the ARRAY values from one page to  another page, or does that just print out the values of the array? I can get it to do that, but I need the ARRAY created on one page and then listed on another page.
  15. Like passing a kidney stone, i'm finding this difficult.... I have a page with a form and a bunch of different checkboxes, I want to put all of the selected checkbox values into an array.... which I have done, but then I want to take that array and pass it to another page....so on the second page, it shows all of the values in that array....  can't seem to get it. Can you help?!?!
×
×
  • 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.