Jump to content

ChrisF79

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ChrisF79's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Greetings: I'm working on a form where a client can schedule their employees for work. The idea is that there will be a table with the employee names going down one column, and then for each day going off to the right, there's two checkboxes for day shift and night shift. The manager can then check the box for when each employee will work and hit submit. The problem is, I'm not sure how to handle this form. Can anybody give me an idea as to how I could name the checkboxes so that I can process the results on the following page and submit it to the database? Any tips, suggestions, help would be greatly appreciated!
  2. I should have noted, it actually does download the images! It just gives me all of those error messages for each image and clutters up the page. Something's wrong so I need to fix it. Thanks in advance for any help you can provide!
  3. Hello: I have a script that I run to pull images down off of the local Realtor MLS. It works fine but it outputs all fo these errors. The part of the code that does it is: // Build the $urls array // $i = 101; $stop = 101 + $num_images - 1; while ($i <= $stop) { $img = 'http://www.sunshinemls.com:8081/pphotos/'.$pieces[1].'/'.$mls_number.'.'.$i.'.jpg'; $urls[] .= $img; $i = $i + 1; } // Use Curl To Save The Files Locally // $save_to = $fullpath; $mh = curl_multi_init(); foreach ($urls as $i => $url) { $g=$save_to.basename($url); if(!is_file($g)){ $conn[$i]=curl_init($url); $fp[$i]=fopen ($g, "w"); curl_setopt ($conn[$i], CURLOPT_FILE, $fp[$i]); curl_setopt ($conn[$i], CURLOPT_HEADER ,0); curl_setopt($conn[$i],CURLOPT_CONNECTTIMEOUT,60); curl_multi_add_handle ($mh,$conn[$i]); } } do { $n=curl_multi_exec($mh,$active); } while ($active); foreach ($urls as $i => $url) { curl_multi_remove_handle($mh,$conn[$i]); echo '<p>$i = ' . $i . '<br />$mh = ' . $mh . '<br />$conn[$i] = '.$conn[$i].'</p>'; curl_close($conn[$i]); fclose ($fp[$i]); } curl_multi_close($mh); That gives me the following errors: Warning: curl_close(): supplied argument is not a valid cURL handle resource in /home/chrisfar/public_html/lister/process_listing.php on line 653 Warning: fclose(): supplied argument is not a valid stream resource in /home/chrisfar/public_html/lister/process_listing.php on line 654 Warning: curl_multi_remove_handle() expects parameter 2 to be resource, null given in /home/chrisfar/public_html/lister/process_listing.php on line 651 I put some statements in there to echo the variables to make sure it's working and when I do a print_r of $url I get this: Array ( [0] => http://www.sunshinemls.com:8081/pphotos/78/209030178.101.jpg [1] => http://www.sunshinemls.com:8081/pphotos/78/209030178.102.jpg [2] => http://www.sunshinemls.com:8081/pphotos/78/209030178.103.jpg [3] => http://www.sunshinemls.com:8081/pphotos/78/209030178.104.jpg [4] => http://www.sunshinemls.com:8081/pphotos/78/209030178.105.jpg [5] => http://www.sunshinemls.com:8081/pphotos/78/209030178.106.jpg [6] => http://www.sunshinemls.com:8081/pphotos/78/209030178.107.jpg [7] => http://www.sunshinemls.com:8081/pphotos/78/209030178.108.jpg ) Then, I output the other variables to make sure and I get this: $i = 1 $mh = Resource id #7 $conn[$i] = For whatever reason, it just isn't getting the $conn[$i] and leaving it blank. Any idea how I can fix this? I'm stumped
  4. Greetings: I have a regex that goes through some source code and finds 3 - Attached and stores it as $garage_spaces. If I then do an echo $garage_spaces, I don't have the but just a space. That's fine enough. When I insert this into a MySQL table, it just looks like "3 - Attached" which is again fine. However, when I do a select and pull the garage field, I get weird ascii characters instead of the spaces. It looks like 3�-�Attached for some reason. It is driving me nuts! Anybody know what I'm doing wrong or what I could try to do to fix this? Thank you so much!
  5. I have the code below in a file and the $mls variable exists and is good. Unfortunately though, when I execute the code below, it doesn't return anything... just a blank page. I am expecting it to echo out the query but it doesn't. Any help would be greatly appreciated! function property_query($mls) { global $dbh; $query = "SELECT l.mls, l.list_price, l.listing_status, l.street_number, l.street_name, l.street_type, l.street_direction, l.unit_number, l.city, l.shortzip, l.subdivision_id, l.furnished, l.listing_long_description, l.elevator, l.year_built, l.beds_id, l.unit_floor, l.total_floors, l.full_baths, l.half_baths, l.sqft_living, l.sqft_total, l.garage_spaces, l.carport_spaces, l.private_pool, l.private_spa, l.acres, l.waterfront_description, l.boat_access, l.view, l.construction, l.roof, l.flooring, l.cooling, l.heating, l.irrigation, l.pets, l.hoa_fee, l.master_hoa_fee, l.condo_fee, l.broker_code, l.office_name, l.foreclosed, l.shortsale, l.broker_reciprocity, l.lat, l.lng, l.num_images, sub.id, sub.subdivision, sub.development, beds.beds_id, beds.beds_desc, status.listing_status_id, status.listing_status_desc FROM listings AS l, subdivisions AS sub, bedrooms AS beds, listing_status AS status WHERE l.mls = '".$mls."' AND l.subdivision_id = sub.id AND l.beds_id = beds.beds_id AND l.listing_status = status.listing_status_id "; return $query; } property_query($mls); echo $query;
×
×
  • 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.