Jump to content

jeger003

Members
  • Posts

    260
  • Joined

  • Last visited

Posts posted by jeger003

  1. What's with all the  ?

     

    lol idk my code doesnt have that........i think it showed up after i edited it....

     

     

    here it is again

    
    $query_search_exact_match = mysql_query("SELECT title,id,live,description,search_text,image,date,price,location_city 
    							FROM   cls_classifieds 
    							WHERE  live = 1
    							AND    search_text 
    							LIKE   '%$search_words%' 
    							OR     title 
    							LIKE   '%$search_words%'
    							OR     description 
    							LIKE   '%$search_words%'") or die(mysql_error());
    
    

  2. hello everyone,

    with the help of users here i created a small search feature for my site (classified site) but when i search for an item i need it to display only "live" listings. it doesnt....it searches and displays all matches

     

     

    my query is here

    
    $query_search = mysql_query("SELECT title,id,live,description,search_text,image,date,price,location_city 
    				FROM   cls_classifieds 
    				WHERE  live = 1
    				AND    search_text 
    				LIKE   '%$search_words%' 
    				OR     title 
    				LIKE   '%$search_words%'
    				OR     description 
    				LIKE   '%$search_words%'") or die(mysql_error());
    
    

     

    what am i doing wrong? by the way it runs without any errors. so it does work.

     

     

    thanks

  3. im trying to create a search field......where it would say "Search...." and when the user clicks the field the "Search..." would disappear and if they clicked out it would return the "Search..."

     

    i think there is a way to do it with onfocus....i would appreciate any help or links to help

     

     

    thanks!!!

  4. hello,

    im trying to edit a source file a template. When i open it with photoshop it says

     

    PNG contains additional data for adobe fireworks, which will be discarded upon save.

     

    then i hit ok but it doesnt show me different objects it displays the entire thing as one image.

     

    any help would be great!

     

    thanks

  5. Hey you!

    I want to put a sort of video script on my server at home and it requires ffmpeg.....any ideas how i can set that up?

     

    another question. I know i have to open port 80 (thanks to wildteen88 earlier today) but i wanted to know the security risks of having the port open and how i can protect myself....i was thinking of just using an internet security like kaspersky.....any ideas

     

     

    thank soo much!!!

  6. OMG! its workS!!

     

    you were right as soon as i changed the <Directory> thing it worked..........this is all new to me...so to have it working hahahah ITS AWESOME!!

     

    but i thought that once i have it pointed to the wwwroot folder i can just go to my ip(http://ip) and it would run the server........is that right??

     

    like how can i make all this live??

     

    Thanks Again Guys!!

  7. Oh man you guys are AWESOME!!! works GREAT!!

     

    now one last issue while we are still on the subject........i am able to change httpd.conf to where i want DocumnentRoot to point to and i want it to point to the servers root which is

     

    C:\Inetpub\wwwroot\

     

    when i do that i keep recieving a Forbidden message........i changed the permissions IIS manager but i still cant get access...is there some where else i need to be looking at?

     

     

    by the way guys i just want to create a server to run a small site from home

     

     

    you guys have been a great help!!

    Thanks!

  8. Hrmmm I doubt there is a tutorial then....  It's pretty easy to install Apache/PHP/MySQL on Windows.  I would just install Apache using the .exe (or maybe .msi) installer available for download from http://httpd.apache.org/, then I would download and install MySQL (using the .exe installer).  Then, I would download the .zip PHP package, and I would add it to Apache as a module.  You might want to change DirectoryIndex in httpd.conf to have index.php too.

     

     

     

    As for what would be needed in httpd.conf for PHP to be loaded, you could use something like:

     

    PHPIniDir "/path/to/php/folder/"
    LoadModule php5_module "/path/to/php/folder/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    

     

     

    yup the tutorial i found says to do just that.......problem is i cant find anything to do with php5apache.dll or any .dll files in the php zip

     

    this is the tutorial

    http://www.php-mysql-tutorial.com/wikis/php-tutorial/installing-php-and-mysql.aspx

    and the guy is on old php and apache

     

    if you go down to the installing php part you'll find the php4ts.dll and how to add Loads to httpd.conf of apache

     

  9. Well here you are: $user_id_cookie is empty.

     

     

    omg your right.......i was calling user id in cookie.....my cookies dont store user ids.......man i would have been at it all day had you not have caught this...

     

    thanks so much...

     

    in the future how can i use your technique??

     

    i can just enter

    $query_private = mysql_query($sql) or die(mysql_error().": $sql");

     

    $sql can be the query to check?

  10. Change

    $query_private = mysql_query("SELECT private_email FROM user WHERE id = $user_id_cookie");
    

    to

    $sql = "SELECT private_email FROM user WHERE id = $user_id_cookie";
    $query_private = mysql_query($sql) or die(mysql_error().": $sql");
    

     

     

     

    new error says

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1: SELECT private_email FROM user WHERE id =

  11.  

    i tried that but i keep getting error

    "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result on line 173 "

     

    line 173 is  $fetch_email = mysql_fetch_array($query_private);

     

    This indicates, that the query failed. Try to display mysql_error

     

     

    your right.........now the error is

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

     

     

    @dmccabe

    i tried your code and it gave me same error as above........i dont understand whats going on

     

     

  12. you have to use mysql_fetch_array on $query_private to get an array from result.

     

    i tried that but i keep getting error

    "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result on line 173 "

     

    line 173 is  $fetch_email = mysql_fetch_array($query_private);

     

     

    $user_id_cookie = $_COOKIE['user_id'];
    $query_private = mysql_query("SELECT private_email FROM user WHERE id = $user_id_cookie");
    $fetch_email = mysql_fetch_array($query_private);
    if(!empty($fetch_email['private_email']))
    {
    $this->body .= "<input type=text name=b[email] value=\"".$fetch_email['private_email']."\" class=details>";
    }
    else
    {
    $this->body .= "<input type=text name=b[email] value=\"".$current_email."\" class=details>";
    }
    
    

  13. hello everyone,

    im trying to call a value from the database so i can use in an if() statement but i dont want to use while() is there another way to do it?

     

    here is what i have but of course it dont work

     

    
    				$user_id_cookie = $_COOKIE['user_id'];
    				$query_private = mysql_query("SELECT private_email FROM user WHERE id = $user_id");
    				//$fetch_email = mysql_fetch_array($query_private)
    				if(!empty($query_private))
    				{
    				$this->body .= "<input type=text name=b[email] value=\"".$query_private['private_email']."\" class=details>";
    				}
    				else
    				{
    
    				$this->body .= "<input type=text name=b[email] value=\"".$current_email."\" class=details>";
    				}
    
    
    

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