Jump to content

jjmusicpro

Members
  • Posts

    290
  • Joined

  • Last visited

    Never

Everything posted by jjmusicpro

  1. Perfect! Ok, now it lists them in hyperlinks is there a way to count how many zips that were in the DB that has the on_off value set to 2 for each of these, and list it behind the hyperlinks for each person? Couldnt we just count the number of times each account shows up? since i am grouping them, i know they atleast have 1 lol thanks again everyone!
  2. Eekkk just cant figure it out, always comes back with a blank page <?php //Paused Clients Query parse_str("$QUERY_STRING"); $db = mysql_connect("localhost", "xxxx","xxxxxxx") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("xxxxxxx",$db)) die("No database selected."); $acc1="SELECT * from zipcodes where on_off=2 group by groupe_name"; $acc2=mysql_query($acc1) or die("Could not select paused clients."); while($acc3=mysql_fetch_array($acc2)) { echo "<a href=\"paused.php?'$acc3[groupe_name]'"\>'$acc3[groupe_name]'</a>""; } ?>
  3. I got it i just added this: $acc1="SELECT account_name from zipcodes group by account_name"; Thanks again!
  4. Thank you very much, how do i limit the results to just 1 instance of that account_name found? Right now, i might have 4 or 5 account_name listed the same, and it will put all 5 of those in the drop down, i just want 1 of each of the uniquie account_name it finds
  5. I changed it but sill didnt want to work: The page comes up with a dropdown, but nothing is in the drop down: <form action='nothing.php' method='GET'>Select Account:<br> <select name='name'> <?php parse_str("$QUERY_STRING"); $db = mysql_connect("[localhost]", "[xxxxxx]","[xxxxx]") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("xxxxxxx]",$db)) die("No database selected."); $sql = "SELECT * FROM `zipcodes`"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) == 0){ echo "No values in database!\n"; }else { echo "<select name=\"zip\">\n"; while($row = mysql_fetch_assoc($res)){ echo "<option value=\"$row[account_name]\">$row[search_id]</option>\n"; } echo "</select>\n"; } ?> </select> <input type='submit' name='submit' value='Submit'> </form>
  6. I tried that but didnt work: Still gives blank drop down... <form action='nothing.php' method='GET'> <select name='name'> <?php parse_str("$QUERY_STRING"); $db = mysql_connect("[localhost]", "[xxxxx]","[xxxxxxx]") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("[xxxxxxx]",$db)) die("No database selected."); $sql = "SELECT * FROM `zipcodes`"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) == 0){ echo "No values in database!\n"; }else { echo "<select name=\"zip\">\n"; while($row = mysql_fetch_assoc($res)){ echo "<option value=\"$row[account_name]\">$row[iD]</option>\n"; } echo "</select>\n"; } ?> </select> <input type='submit' name='submit' value='Submit'> </form>
  7. I tried to run that code and it didnt work It builds the page, and the drop down, but nothings in the drop down I have a table called zipcodes, with a column called account_name <form action='nothing.php' method='GET'> <select name='name'> <?php parse_str("$QUERY_STRING"); $db = mysql_connect("[localhost]", "[xxxxxxx]","[xxxxx]") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("[xxxxxx]",$db)) die("No database selected."); $acc1="SELECT * from zipcodes"; $acc2=mysql_query($acc1) or die("Could not select accounts."); while($acc3=mysql_fetch_array($acc2)) { echo "<option value='$query[account_name]'>$query[account_name]</option>"; } ?> </select> <input type='submit' name='submit' value='Submit'> </form>
  8. thank you very much, now i have a column named owner, and i have a owner listed multiple times, how do i make it only display unique results?
  9. Do you have a code example? I am new to php, thank you for all your help :D
  10. i wanted to query my db, and then add values to drop down menu, where when they select what they want in the dropdown, it will bring them to another page accounts.php where they will have more options, any help?
  11. Hello everyone i am new here! I was wondering how i can run a DB query then stick the results in hyperinks, so when they click a hyperlink it will take then to say an update page. I have 1 table called test_table with 3 rows ID, First_Name and Last_Name thanks again!
  12. i am trying to get the initial database setup,and i have a ton of data in a CSV file, so i want to import it into mysql but 1 of my fields on the CSV have a hyper link ie: <a href="http: someplace etc.... and it wont let me upload it. Any ideas on how to get around this?
  13. I am trying to import some data via CSV, and it keeps saying error on line 1, does it not like to make hyperlinks with "" marks to be uploaded?
  14. Ok I need help with this one. I have a subdomain for example http://someplace.arcadeplace.com that will work, however http://www.someplace.arcadeplace.com wont work. so when i put the www in front it wont work. i am running plesk 8.2.0 thanks for the help
  15. I was trying to target an iframe on my main page called "gallery_images". However, for some reason, when i try to click on my hyperlink, it just opens in a new page. <a href="index.php?groupid=<?php $groupid_sent = $_GET['groupid']; echo $groupid_sent ?>" target="gallery_images"><img src="nav_home.gif" alt="1" width="190" height="22" border="0"></a>
  16. how do the search engines that look for zipcodes that begin with 0 work right now? They seem to find ones that begin with 0
  17. so why wont it appear when i search for 08888?
  18. ok i have a weird problem, i have a database that holds zipcodes, and some zipcodes are say 08888 however when they are entered in the DB they are 8888, so if someone enters 08888 into my search it wont find it. The colume is a varchar, can anyone help?
  19. How do i get the date in there? do use date()? Also, is there a way to get any more info from the user? when they land on my page? like what keyword was used to get to my site?
  20. Hi everyone! I was trying to run 2 querys in the same block. I wanted enter the zipcode they entered into a database for future analytics later, as well as spit out the results of the search. I already have the search results part working, but i cant seem to get the insert to work correctly. my table for keeping records of the zipcodes searched is: search_id (auto incrment) zipcode time_date Thanks for the help everyone! PHPFreaks ROCKS!!!!!!!! if($_SERVER['REQUEST_METHOD'] == "POST"){ require_once ('connect.php'); require_once ('opendb.php'); $zipcode = $_POST['zipcode_entered_search'];<br> $query = "INSERT INTO searched_zips VALUES ('','$zipcode','','')"; $result = mysql_query($query); $query = "SELECT * FROM zipcodes WHERE zipcode='$zipcode'"; $result = @mysql_query ($query); $count = mysql_num_rows($result); //number of results
  21. What i am doing is.. The user goes to the main page, and enters a zipcode, then 3 things can happen... if a result is found, only 1, it will redirect them to a new url in the database if 2 results, it will loop through results if 0 results, then it will redirect them to a page i am now where it needs to post the zipcode entered in a string like "we couldnt find your xxxxxx zip, please...."
  22. For some reason, i cant seem to post values, so the page i am sending the person to wont grab the values i posted. on my main page, i have this code. while($row = mysql_fetch_array($result, MYSQL_ASSOC)){ $site = $row['redirect_url'] ; echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$site\">"; } Then on my recieving page i have this: <?php $searchsomewhere = $_POST['zipcode_entered_search']; echo $searchsomewhere; ?> It just wont post the values.
×
×
  • 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.