Jump to content

Orionsbelter

Members
  • Posts

    493
  • Joined

  • Last visited

Posts posted by Orionsbelter

  1. list($first, $last) = explode(" ", $q, 2);
    $query="SELECT id, Username, First_Name, Surname FROM members WHERE fullName LIKE '%$fullName%' OR First_Name LIKE '%$first%' OR Surname LIKE '%$last%'";

     

    I'm using this too search for a user. I have a input box and wanted to allow the viewer to search for a user. I wanted a script that would take apart the input text if they user enter both the forename and surname this does just that. But i also wanted it to search the database even if they only entered a forename.

     

    However the problem am getting its that if they type in only a forename it will bring up all the users in the database. Most likely because it's seeing the $last variable as "" or " ".

     

    Here is a quick example if i type in john smith, it brings up ONLY john smith If i type in john it brings up all the users. Even if the name is nothing alike. I want it too only bring up people with the firstname john if they only enter the forename.

     

    Please help me, and maybe you can save me from pulling my hair out :D

  2. Hi there i'm trying to do something very simple but do not know how too. Please look at this link http://www.uo.com.au/accessories.cfm?t=/belts/ see the products are in rows on each row there is 4 belts then they start  a new row.

     

    I'm building a shop where i want to Echo all products of a certain category for example say am selling belts like the site above.

     

    I want echo each product in a div box and the product image inside, i need the script to put each div box next to each other (side by side ) like the link shows. Then after it gets to a fourth belt it should then start a new row of products under it to stop overflowing.

     

    Can anybody help?

  3. you use recipeID as parameter in the url but in the script i don't see you use the recipeID at. I thought you would be declaring this so you can use it in your query for example i though you would be using recipeID=THE ID OF THE RECIPE YOU WANT TO VIEW for example recipeID=1.

     

    Then i though you would then be using that in a query to pull that recipe's info for example SELECT * FROM recipes WHERE id='".$_GET['recipeID']."']

     

     

  4. How would i do this? say for example i execute a while loop that will loop for 30 times, however each third i want it echo Hello; so this means at loop 3, 6, 9, 12, 15 etc it will echo Hello.

     

    Also so i had a table that consisted of 3 cols, the same again the loop goes for 30 times but this time it creates a new row and each third loop for example 3, 6, 9, 12, 15 etc it created another row.

     

    For example the PHP interpreter would say ok loop this until 30 then it'll go 1 2 3 NEW ROW 4 5 6 NEW ROW 7 8 9 NEW ROW etc.

     

    How are these done?

     

    Thank you for reading

  5. Hi there i have been working on a website where i have used the function gmdate(); many times in my scripts however as people may know the time for London has now go forward an hour there when using the gmdate(); function now it's one hour wrong how can i correct this?

     

    Thank you very much for reading :D

  6. But wouldn't that mean a lot of infomation been put into the database? Wouldn't it be overloaded it? So as if there is 50 polls and 2000 members and each of them votes on each poll that is 100,000 inserts into that table.

     

    Also the polls will never get deleted nor the results.

     

     

  7. Hi there i'm making a small voting script for members. However i'm a bit stuck. Users get to vote on a poll but only once.

     

    However i'm having about 50 polls but do not know to to stop them for voting more than once. I heard of people using a text method to save all the polls IDs in one text type field in the database assigned to the members username.

     

    But i still don't really understand how i could do this could someone help me please :D

     

    Thanks for reading 

  8. Hi there i'am have a bit of a issue with the script i'am using. The idea is i click a image and it sends off a change to the database using the XMLHttpRequest however when i try using.

     

    document.getElementById("rep_"+str).innerHTML=xmlhttp.responseText;

     

    to put the reponse text in a unqiue div it does not!.

     

    The program i have here is simply a fourm the image i said i'm clicking a delete reply icon. i want that to then change to deleted reply to some text such as "Deleted by admin" that is why i wanted update the reply on screen with the reponse text without refreshing.

     

    The div is inside many other divs does this matter?

     

    thank you for reading

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