Jump to content

izbryte

Members
  • Posts

    85
  • Joined

  • Last visited

    Never

Posts posted by izbryte

  1. I have an array of items that I need to print out. I have it set so that there is a comma after each item.

    Here's my current code:

    $specialties=explode(",",$row['specialties']);				
    foreach($specialties as $fs) {
    echo "$fs, ";
    }

     

    Is there any way that I can remove that last comma?

     

    Right now it looks like this

    A, B, C, D, E,

    I'd like it to look like this

    A, B, C, D, E

     

    Thanks in advance for any help!

  2. AHHH! No! I'm absolutely NOT trying to spam! I'm so sorry to come across that way! or maybe I don't understand the definition. I always thought of a spammer as one who sends mass amounts of email usually about some prescription drug or other paraphernalia to anyone's email they can get their hands on.

    I'm just trying to market my website by sending ONE email to clients who have posted their info on a particular page. Either way, I'm sorry.. not my intention to come across as a spammer and we can just take this post down if you prefer.

  3. First off, I'm not trying to be a spammer. I have a website geared for architects that I would like to advertise. There is this website that has a huge email list of people who I think would like my site. I've been manually copying and pasting email addresses off this page and sending them an email letting them know about the site. I'm wondering if there's some sort of software out there (that actually works) that would help me save time by extracting all emails for me?

     

    Thanks for any help and/or comments! :)

  4. ok, cool. here are a few of my date entries:

     

    2007-11-18 18:14:38

    2007-12-07 18:41:31

    2007-12-08 08:49:40

     

    "duration" is set to 30 on all of them right now

    so what I'm looking to get back is the date + 30 days

     

    so for example, say they registered on Jan 1, 2008 with 30 days duration (making expiration date Jan 31, 2008). their submission should show till Jan 31, 08

     

    but if they registered on Dec 1, 2007 with 30 days duration (making expiration date Dec 31, 2007). the submission would not show

  5. I have a script where I'm trying to work out an expiration on their uploaded posts

     

    I have a field "date" and a field "duration". When they submit their post date is submitted as NOW() and duration is either "30" or "60" (days).

    When I pull this back I want to select everythings that NOT expired... so NOW must be less than the DATE they entered it + the DURATION they chose.

    Here's my query (that's not working)

     $query  = "SELECT * FROM jobs WHERE NOW() < `date` + INTERVAL `duration` DAY AND paid = '1' ORDER BY `job_id` DESC $limit";

     

    Can anyone tell me why this is not working?

     

  6. Anyone?

     

    Here's some more info on how things are set up. This is a job site where people can post jobs or submit their firm information for a fee.

     

    It is now set up so after they input all their info it is saved in a database with the field “paid” set to “no”. They then choose whether they want to post their job for 30 or 60 days and click on “continue” which will take them to Paypal where they make their payment. Then, Paypal sends back that they’ve paid (so field “paid” switches to “yes”) and which duration they chose (30 or 60 days).

     

    The firm submission is even simpler. All they have to do is go to paypal, pay for it and then we just need confirmation that payment was made (so field “paid” switches to “yes”).

     

    I think what I need is pretty simple. But, I do need a hand-holder. Please PM me if you are interested.

     

  7. This is a script where user can search jobs by selecting a location or category and entering a search keyword. It works fine in Mozilla but turns up nothing in IE?

    Can anyone help me?

    if (isset($_POST['Search'])) {
    
       $query  = "SELECT * FROM jobs WHERE NOW() < expires  AND paid = 'yes' ";	
       $keyword = trim($_POST['keyword']);
       
       if($_POST['keyword']!=''){
      
      $find = mysql_real_escape_string(htmlentities($_POST['keyword']));
      $find = strtoupper($find);
      $find = strip_tags($find);
      $find = trim ($find); 
      
         if(($_POST['category']!='')&&($_POST['location']!='')){
    
    	   $query .= "AND category = '".mysql_real_escape_string($_POST['category'])."'  
        	              OR location = '".mysql_real_escape_string($_POST['location'])."' 
    				  OR title LIKE '%$find%'";
    				  $search = TRUE;
    
     	 }
       elseif(($_POST['category']!='')&&($_POST['location']=='')){
    
    	   		   $query .= "AND category = '".mysql_real_escape_string($_POST['category'])."' OR title LIKE '%$find%'";
    			   $search = TRUE;
    
        }
       elseif(($_POST['category']=='')&&($_POST['location']!='')){
        		
    		       $query .= " AND location = '".mysql_real_escape_string($_POST['location'])."' OR title LIKE '%$find%'";
    	           $search = TRUE;
    
    }
    else
    {
    
      $query .= "AND title LIKE '%$find%'";
    	           $search = TRUE;
    
    }
    
    }
    
    else{
    if($_POST['location']!=''){// Check if the location isnt empty
           if($_POST['category']==''){ // Check if category is empty 
           
    	   $query .= "AND location = '".mysql_real_escape_string($_POST['location'])."'"; 
    	   $search = TRUE;
    
       }// End if category is empty
       }// End if location isnt empty
    
           	    if($_POST['category']!=''){// Check if the category isnt empty
               if($_POST['location']==''){ // Check if location is empty 
           
    	   $query .= "AND category = '".mysql_real_escape_string($_POST['category'])."'"; 
    	   $search = TRUE;
    
    
       }// End if location is empty
       }// End if category isnt empty	
            
    	    if($_POST['category']!=''){// Check if the category isnt empty
               if($_POST['location']!=''){ // Check if location is empty 
           
    	   $query .= "AND category = '".mysql_real_escape_string($_POST['category'])."' AND location = '".mysql_real_escape_string($_POST['location'])."'"; 
    	   $search = TRUE;
    
          }// End Else
       }// End if location isnt empty
       }// End if category isnt empty	
       
       if($search){
    $aa = mysql_query($query) or die(mysql_error());
         while($row = mysql_fetch_array($aa)){
      
    echo $row['title'];
    
     }// End While  
       }// End if Search is true
       else
       {
       
       echo 'No search term selected.';
       
       }
    }// End if form was submitted   

  8. I have a site where people can post jobs and/or submit their firm information for a fee. I'm using Paypal to handle the payment process. What I'm looking to do is once they input all their information into a form, they then click on a button, go to Paypal and pay for it and then it's added to the database and updated on our list. That's it...

     

    Can someone help me do this?

  9. I have a form with two dropdown boxes where the user can search my database of jobs by either job category or location or both. Right now I can pull up results if they select an item from each dropdown (both) but I don't know how to pull up the results if they select only one or the other.

     

    if (isset($_POST['Search'])) { // Handle the form. 
    
    	// Check for an location. 
    	   if (!empty($_POST['location'])) { 
    		  $l = ($_POST['location']); 
    		  $search = TRUE;
    	   }
    	// Check for a category. 
    	   if (!empty($_POST['category'])) { 
    		  $c = ($_POST['category']); 
    		  $search = TRUE;
    	   } 
    	$query  = "SELECT * FROM jobs WHERE (location = '$l') AND ( category = '$c') ORDER BY job_id DESC";	
    
    }

     

    So now, if they only select a location (for example) then no results will show. How can I fix this?

  10. Also, if you click the little folder icon in the properties tab next to link and the target button, there is a dropdown menu at the bottom of the dialogue saying 'Relative To:' and you can choose 'Site Root' or 'Document'. You'll probably want to select Site Root.

     

    That worked. It was set relative to the site root. When I changed it to document it dropped the "/".

     

    Thanks for your help!

  11. I understand how the relative links work but sometimes as a designer I create a specified folder for my clients. So it's like mySite/theirFolder/theirFile.htm

     

    Dreamweaver is adding that "/" in front of everything and when I upload files they aren't showing up right. I have to manually go back into the page and delete every "/" that is in front of a relative link! I've been doing this for years with Dreamweaver Mx 2004 and this has just happened all of a sudden. I must have changed some option not realizing it in Dreamweaver. How can I change it back so there's no "/" in front of the links?

     

    ARRRGGG! ... (lol)

  12. Basically I have a form that people fill out (name, address, email, etc) and then they have have to check all their specialties using checkboxes. All this info gets put into a database. I'm using the serialize function to handle the checked info.

    Now I'm creating another form where admin can edit this information if needed. So, I'm trying to basically re-create the form with the previous entered values showing. So the name textbox shows the value entered for name, email textbox shows the email address entered, etc.... and all the checkboxes show up with the previously checked ones checked.

    All the values are coming up fine in the textboxes but I can't get the previously checked ones to show up checked.

    Here is my code (that's obviously not working):

     $array1 = array ('Accessibility/ADA Consultants','Acoustics','Adaptive Reuse',
    	  'Art Consulting','Banks/Financial','Criminal Justice',
    	 'Custom Furniture','Design-Build','Educational Facilities',
    	  'Energy Saving Design','Engineering','Environmental',
    	 'Environmentally Conscious Design','Exhibition Design','Facilities Management',
    	  'Food service/Restaurant','Engineering','Environmental',
    	 'Health Care/Medical','Historic Preserv./Restoration','Hotels/Hospitality',
    	  'Housing (Single Family)','Housing (Multi-Unit)','Illustration',
    	  'Industrial','Institutional Facilities','Interiors',
    	 'Kitchen Design','Lab./Research Facilities','Landscape',
    	  'Libraries','Lighting','Museums/Galleries',
    	  'Office Buildings/Comml.','Pharmaceuticals','Photography',
    	  'Planning','Public Relations/Mktg.','Public Work \(Civic/Govt.\)',
    	  'Recreation/Theme Parks','Religious Facilities','Restaurants',
    	  'Retail/Shopping','Solar Design','Sports/Athletic Facilities',
    	 'Theater/Entertainment','Transportation','Urban Design',
    	  'Zoning/Building Comp.','Other');
    	  $specialties = unserialize($row['specialties']);
    		foreach ($array1 as $value)
    					{
    						echo '<tr>
    						<td bgcolor="#F2F5F9"><input type="checkbox" name="specialties[]" value="' . $value . '"';
    						if ($value == $s) {
    						echo ' checked';
    						}
    					echo '></td><td align="left" bgcolor="#F2F5F9" class="small_10">' . $value . '</td>
    						</tr>';	
    				}

     

    The first person that can help me with this I'll pay $50 USD via Paypal. You can PM me for more info if needed. I'll be available all day today (PST).

  13. I'm sure that this could be set up better... LOL.

    Basically I have a form that people fill out (name, address, email, etc) and then they have have to check all their specialties using checkboxes. All this info gets put into a database. I'm using the serialize function to handle the checked info.

    Now I'm creating a form where admin can edit this information if needed. So, I'm trying to basically re-create the form with the previous entered values showing. So the name textbox shows the value entered for name, email textbox shows the email address entered, etc.... and all the checkboxes show up with the previously checked ones checked.

    Does that help at all?

  14. I am a very busy website designer and know some PHP but I’m VERY far from an expert. I’m looking for someone who is good with PHP and I can depend on to get back to me quickly. Sometimes I am simply stuck on something and need some help, other times I need full projects completed. If you are interested in building a working-relationship with me please PM me. FYI... I pay through Paypal or check.

     

     

×
×
  • 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.