Jump to content

bossman

Members
  • Posts

    98
  • Joined

  • Last visited

    Never

About bossman

  • Birthday 09/22/1987

Contact Methods

  • AIM
    n/a
  • Website URL
    http://www.rckwebmedia.com
  • ICQ
    1600
  • Yahoo
    n/a

Profile Information

  • Gender
    Male
  • Location
    Pittsbugh

bossman's Achievements

Member

Member (2/5)

0

Reputation

  1. thats what i thought but i just needed the confirmation, i knew i was on the right track, THANK YOU!!
  2. Hi all, I am currently in the process of building an admin for a directory website we are currently working on.. here is a link to the admin... http://mediagenius.biz/test/hairlossdir/index_test_admin.php as you can see, there are 3 basic functions. Add, edit, and delete...universal among content management systems. The problem i am having, is that i stopped coding for a short while, and i need a point in the right direction regarding the edit and delete functions... so far the add function works fine. here is the code for the add... <? require("db_connect.php"); $new_name = $_POST['name']; $new_contact = $_POST['contact']; $new_streetaddress = $_POST['streetaddress']; $new_city = $_POST['city']; $new_state = $_POST['state']; $new_zipcode = $_POST['zipcode']; $new_country = $_POST['country']; $new_phonenumber = $_POST['phonenumber']; $new_email = $_POST['email']; $new_website = $_POST['website']; //query to insert files and info into database $query = "INSERT INTO hair_loss_clients (name, contact_name, street_address, city, state, zipcode, country, phone_number, email, website) VALUES ('$new_name', '$new_contact', '$new_streetaddress', '$new_city', '$new_state', '$new_zipcode', '$new_country', '$new_phonenumber', '$new_email', '$new_website' )"; $result=mysql_query($query); mysql_close($link); header("Location: http://mediagenius.biz/test/hairlossdir/index_test_admin.php"); ?> when i click the 'edit' button, i want it to pull in all the information into the text fields based on the id. I have done this before, but im not positive how to put the code together... i know that in the 'edit' link, i will have to pass the $id so that it knows which information to pull into the text fields...once i do that i know what to do... any help is appreciated!
  3. thank you very much!!!! that helped alot!
  4. hello all, haven't been in here in a while, took a break from developing but now im back at it and a bit rusty :/ i'm trying to write a query so that when a user clicks a link that says "A" , it will grab all the names in the database that start with an "A". I wanna do the same thing with the whole alphabet. Anyone have any suggestions on a query? something like "Select id, name, contact_name, street_address, city, state, zipcode, country, phone_number, email, website FROM hair_loss_clients ORDER BY name ASC ----- ??? " what would go at the end there to make it select only titles that start with "A"? THANK YOU IN ADVANCE!
  5. hello all... i have a php calendar that we made, and when you click an event on it, a popup window opens up with all the event information in it. But...some of the events have a contact, and some dont... what i want to do is write an if, else statement to display the contact if it exists, and if it doesnt, display nothing... if (what do i put here) { echo "<div style='contact'><strong>&#8226; Contact</strong></div><br/><p class='show_desc'> ".$contact."</p>\n"; }else{ echo "<br />" } the question is in the example if statement above... what do i put there? the name of the column in my table is 'contact' (pretty simple) i assume it would be something like if $row['contact'] > 0 , but i think im wrong... any suggestions?
  6. ok cool i thought maybe i was just looking too hard!! haha Thanks again for your help
  7. o and i would li ke to mark this topic solved where is the new button at? still getting used to the new layout..
  8. omg i totally just did that and then i come back to the post and you had just posted to do exactly what i did hahahaha THIS WORKED PERFECT!! I APPRECIATE ALL YOUR HELP MAN!
  9. hmm...that code is working. I slightly modified it, and im very close to getting the functionality i need. It's very cleanly and efficiently displaying the 'results from .. ' but it is still displaying the empty ones. <div style="font-family:Verdana, Geneva, sans-serif;font-size:14px;padding-left:20px;"> <?php echo (count($error) > 0)?"<br /><strong>The following had errors:</strong><br />" . implode("<br />", $error) . "<br /><br />":""; ?> <?php $search[0] = 'Results for <strong>'.$searchTerms[0].'</strong><br />'; $search[1] = 'Results for <strong>'.$searchTerms[1].'</strong><br />'; $search[2] = 'Results for <strong>'.$searchTerms[2].'</strong><br />'; $search[3] = 'Results for <strong>'.$searchTerms[3].'</strong><br />'; $search[4] = 'Results for <strong>'.$searchTerms[4].'</strong><br />'; $search[5] = 'Results for <strong>'.$searchTerms[5].'</strong><br />'; //echo (count($results) > 0)?"<br />Results for <strong>'{$searchTerms[0]}'</strong><br /><br />" . implode("", $results):""; echo (count($results) > 0)?''.$search[0].''.$search[1].''.$search[2].''.$search[3].''.$search[4].''.$search[5].'<br />'.implode("", $results):""; ?> </div> Here's a link. Search a city. Then when the results pop up, pick one and fill out all the information for it in the search box. It's picking up everything and displaying it, but theres still empty results strings up there. You think perhaps an if statement would be the way to go? http://wesco.jp-clients.com/fasttrack_locator/new_test/
  10. this seems right on track and makes perfect sense. I'm going to begin to implement this in ASAP THANK YOU SO MUCH FOR YOUR HELP!!!!!!!!!
  11. you might need to change some settings in your php.ini file. Or your not specifying your SMTP server correctly
  12. i made some changes to my code.... go to the link again from above...(it is pasted again below).... http://wesco.jp-clients.com/fasttrack_locator/new_test/ go to the FIRST input at the top, and type in 'Pittsburgh'..... submit.... now look at what happens... got a bunch of "results for "" ". I want it to only display the "results for..." for whatever fields were entered...here's what i have tried so far... <?php echo (count($results) > 0)?"<br />Results for <strong>'{$searchTerms[0]}'</strong><br />" . "<br />Results for <strong>'{$searchTerms[1]}'</strong><br />" . "<br />Results for <strong>'{$searchTerms[2]}'</strong><br />" . "<br />Results for <strong>'{$searchTerms[3]}'</strong><br />" . "<br />Results for <strong>'{$searchTerms[4]}'</strong><br />" . "<br />Results for <strong>'{$searchTerms[5]}'</strong><br /><br />" . implode("", $results):""; ?>
  13. displaying the "results for <strong>'{$searchTerms[0]}" isn't the problem. What i'm trying to figure out, is a code to write to make the page figure out which fields were entered, and only display "results for...." from the fields that text was entered into... lets say someone entered information into search0 and search1 on the form... once the search is submitted, it will display "results for (search0)" ....then skip to the next line and display "results for (search1)" .... if nothing is entered for search2 and search3 etc...then nothing is displayed because nothing was entered
  14. hmm after further review im not sure if that code snippet will help. I have a feeling i need to manipulate this statement in some way... <?php echo (count($results) > 0)?"<br />Results for <strong>'{$searchTerms[0]}'</strong><br /><br />" . implode("", $results):""; ?> specifically im trying to get it so that no matter which field they enter some data into...(only at least one field is required), it will display "Results for '(whichever input they filled in to search)' " i tried manipulating the statement to include $searchTerms[0], $searchTerms[1], $searchTerms[2], etc..... Does this make more sense? How can i manipulate the statement above? Would it be a large if/else statement? Something like, "if searchTerms[0] is empty, display nothing, but if data is entered, display "results for $searchTerms[0]", and check to see if $searchTerms[1] contains any data" ...and so on and so on through all 5 fields... I appreciate the responses thus far but i feel that i wasnt elaborate enough on my original post and i apologize for that.
×
×
  • 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.