Jump to content

cavey5

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cavey5's Achievements

Member

Member (2/5)

0

Reputation

  1. Alright, i checked those out and found a suitable option, however I am having one problem adjusting the style. Can someone point out which element to adjust to move the navigation buttons (numbers) up below the photo? I cannot get any of them to work ??? Screetshot: Style Sheet #centercol { width:350px; height: 400px; background:#dcdcdc; float:left; color:#222; text-align:justify; margin:0; padding:0; } #centercol_entry { width:350px; float:left; margin:6px 0 0 0; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-align:justify; padding:0; background: #dcdcdc; } #album /* style the outer containing div to fit the landscape, portrait and buttons */ { width:350px; height:220px; background:#eee; border:1px solid #aaa; margin:0; } .gallery /* remove the padding margin and bullets from the list. Add a top margin and width to fit the images and a position relative */ { padding:0; margin:280px 0 0 0; list-style-type:none; position:relative; width:350px; } .gallery ul { margin: -30px; } .gallery img /* remove the default image border */ { border:0; } .gallery li /* make the list horizontal */ { float:left; margin: 0; } .gallery li a, .gallery li a:visited /* style the link text to be central in a surrounding box */ { font-size:11px; float:left; text-decoration:none; color:#000; background:#fff; text-align:center; width:26px; height:26px; line-height:24px; border:1px solid #444; margin:2px 2px 2px 2px; } .gallery li a img /* position the images using an absolute position and hide them from view */ { position:absolute; top:-280px; left:0; visibility:hidden; border:0; } .gallery li a img.landscape /* fix the top position for the landscape images */ { top:-280px; } .gallery li a img.portrait /* fix the left position for the portrait images */ { left:0; border-left:40px solid #eee; border-right:40px solid #eee; } .gallery li a:hover /* style the hover background color for the text boxes */ { background:#ddd; } .gallery li a:active, .gallery li a:focus /* style the active/focus colors for the text boxes (required for IE) */ { background:#444; color:#fff; } .gallery li a:active img, .gallery li a:focus img /* make the images visible on active/focus */ { visibility:visible; } Display Code <div class="centercol"> <div id="centercol_entry"> <div id="album"> <ul class="gallery"> <li><a href="#nogo">01<img class="landscape" src="images_photonav/1.jpg" alt="landscape image 1" title="landscape image 1" /></a></li> <li><a href="#nogo">02<img class="landscape" src="images_photonav/2.jpg" alt="landscape image 2" title="landscape image 2" /></a></li> <li><a href="#nogo">03<img class="landscape" src="images_photonav/3.jpg" alt="landscape image 2" title="landscape image 3" /></a></li> <li><a href="#nogo">04<img class="landscape" src="images_photonav/4.jpg" alt="landscape image 2" title="landscape image 4" /></a></li> </ul> </div> [ the article here is generated by wordpress ] </div> </div>
  2. My website has news articles and we usually display a photo with each article. We'd like to show five photos though and have the ability to scan through them with links. Is there a way to do this by showing / hiding CSS layers, and not using JavaScript? Or, what is the best way to do it with javaScript? screenshot: www.timbercrawler.com/tim/photoscript.jpg
  3. Let me explain the problem I am trying to solve, and maybe you will better understand what I need: I run a magazine and we get a lot of customer service calls from subscribers, also emails, PM's etc on all the forums we're on - from all over the world. People just cannot seem to email our customer service account or call the center, they PM my employees on odd forums. Eventually, these get funneled back to one person; amazingly she handles all CS for the whole company. So I wrote her this beautiful piece of PHP wonderment that manages all of our subscriber accounts from our server, its just a database front end but it's cool :-) It includes a private messaging system so other employees can send her messages, like forwarding a phone call message about a problem customer. The reason I have them going thru the PM system in my software is that emails get lost, sticky notes and paper messages get lost etc... when they send her a PM though it is in her inbox, and when she sits down to go thru service calls, they are all right there and logged and saved; especially if they knew the subscribers ID or name, it will pull the account up for her when she clicks the account number. It works great. The only problem is that my other employees have to log in to the software in order to PM her. What would be cool is if they sent an email to a specific account, an account only used for customer service and not used to reply to anything... and when you sent an email to this account, it showed up in her inbox inside this software. It would ignore attachments and simply include who it was from, a subject line and a message. That's it, everything else is stripped out and everyone sending to this address (non-public personnel) would know this. My question is how do I check an email account (on my server locally) for new messages and read it into PHP variables? Is there a method or functions built for this sort of thing?
  4. Okay, I found another tutorial but it doesn't work either, what the hell is up with these tutorials? Here is a link to my test page: http://www.atticuspubs.com/test/search.php The code is below. If you were to type in "98" you should get a list of customers in the 98*** zip codes, which you do for the first 5 results, but then if you click page 2 or any other page, it goes haywire and lists all the customers, and no longer do they have 98*** zip codes. Where is my error? Also, you'll see this code commented out: //If($SearchString == "") { //Echo"Nothing to Search For"; //exit(); If I uncomment it, the if statement fails and it displays "Nothing to Search For" every time, even if I know it is a good search term... why is that? <?php // Makes initial connection to database define ('DB_USER', '********'); define ('DB_PASSWORD', '********'); define ('DB_HOST', 'localhost'); define ('DB_NAME', '********'); $connect = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error()); $db = @mysql_select_db(DB_NAME, $connect) or die(mysql_error()); $SearchString = $_POST['searchterm']; $Limit = 5; //Number of results per page If($SearchString == "") $SearchString=$_GET["SearchString"]; // Get the search term from the navigation (GET) //If($SearchString == "") { //Echo"Nothing to Search For"; //exit(); $page=$_GET["page"]; //Get the page number to show If($page == "") $page=1; //If no page number is set, the default page is 1 //Get the number of results $SearchResult=mysql_query("SELECT * FROM subscriber_data WHERE zipcode LIKE '%$SearchString%' ORDER BY zipcode") or die(mysql_error()); $NumberOfResults=mysql_num_rows($SearchResult); //Get the number of pages $NumberOfPages=ceil($NumberOfResults/$Limit); //Get only the relevant info for the current page using LIMIT $SearchResult=mysql_query("SELECT * FROM subscriber_data WHERE zipcode LIKE '%$SearchString%' ORDER BY zipcode LIMIT " . ($page-1)*$Limit . ",$Limit") or die(mysql_error()); ?> <?php //Print the Titles While($row = mysql_fetch_object($SearchResult)) { Echo $row->firstname . " " . $row->lastname . " " . $row->zipcode . "<br />"; } ?> <br /><br /> <?php //Create and print the Navigation bar $Nav=""; For($i = 1 ; $i <= $NumberOfPages ; $i++) { If($i == $page) { $Nav .= "<B>$i</B>"; }Else{ $Nav .= "<A HREF=\"searchresults5.php?page=" . $i . "&SearchString=" .urlencode($SearchString) . "\">$i</A>"; } } ?>
  5. I am not writing a query, I am using phpMyAdmin, which is doing its own query, and I am not sure how to extract that code... It doesn't matter if I select that or not, I get the same result. I tried yet another file of 200 records and it successfully inserted 277 queries, but only 102 records show up on browse. I can't have this level of inconsistency with client records!
  6. Not sure how to do that with an array but... I need to check each field for data, and then if it is populated, at that string to the query, and because it will be created dynamically, how do I insert the AND between each one? So out of ten fields, say numbers 1, 3 and 5 are populated, I need a query that says SELECT * from table WHERE 1 = '$searchterm1' AND 3 = '$searchterm3' AND 5 = '$searchterm5'; how do i dynamically create that query based on user input?
  7. Read the code, it does all of that. Like I said, it is the official pagination tutorial posted on this site, but it doesn't work...
  8. I just re-ran the import of 4533 records and it gives me this notice: "Import has been successfully finished, 4533 queries executed." But when I browse my records in phpMyAdmin I get this: "Showing rows 0 - 29 (1,823 total, Query took 0.0008 sec)" and randomly a bunch of records are missing. It isn't like it stopped at a certain number, they are sorted sequentially by user ID but like it will skip 5 and then skip 12 of them and then have 5 in a row correct, then skip 3... ??? ??? is there an easy to use import tool with an easy learning curve for this¿ phpMyAdmin sucks.
  9. I can't actually post the file as it is proprietary client data, but I will mix it up and create some fake names and post that...
  10. I used this tutorial: http://www.phpfreaks.com/tutorials/43/0.php I copies his code and simply changed my database login info and the names of the fields to display and here is what I get: http://www.atticuspubs.com/organic/pagination.php There are about 300 records that match my search query, what gives? It will display as many results as I put as the limit, if I put 50, it lists out 50... but it won't paginate... WTF? <?php // Makes initial conection to database define ('DB_USER', '*********'); define ('DB_PASSWORD', '*********'); define ('DB_HOST', 'localhost'); define ('DB_NAME', '*********'); $connect = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('215 Our database is currently down for updates, please check back later.'); // or die(mysql_error()); $db = @mysql_select_db(DB_NAME, $connect) or die('216 Our database is currently down for updates, please check back later.'); $limit = 12; $query_count = "SELECT count(*) FROM subscriber_data"; $result_count = mysql_query($query_count); $totalrows = mysql_num_rows($result_count); if(empty($page)){ $page = 1; } $limitvalue = $page * $limit - ($limit); $query = "SELECT * FROM subscriber_data LIMIT $limitvalue, $limit"; $result = mysql_query($query) or die("Error: " . mysql_error()); if(mysql_num_rows($result) == 0){ echo("Nothing to Display!"); } $bgcolor = "#E0E0E0"; // light gray echo("<table>"); while($row = mysql_fetch_array($result)){ if ($bgcolor == "#E0E0E0"){ $bgcolor = "#FFFFFF"; }else{ $bgcolor = "#E0E0E0"; } echo("<tr bgcolor=".$bgcolor."><td>"); echo($row["id"]); echo("</td><td>"); echo($row["firstname"]); echo("</td></tr>"); } echo("</table>"); if($page != 1){ $pageprev = $page--; echo("<a href=\"$PHP_SELF&page=$pageprev\">PREV".$limit."</a> "); }else{ echo("PREV".$limit." "); } $numofpages = $totalrows / $limit; for($i = 1; $i <= $numofpages; $i++){ if($i == $page){ echo($i." "); }else{ echo("<a href=\"$PHP_SELF?page=$i\">$i</a> "); } } if(($totalrows % $limit) != 0){ if($i == $page){ echo($i." "); }else{ echo("<a href=\"$PHP_SELF?page=$i\">$i</a> "); } } if(($totalrows - ($limit * $page)) > 0){ $pagenext = $page++; echo("<a href=\"$PHP_SELF?page=$pagenext\">NEXT".$limit."</a>"); }else{ echo("NEXT".$limit); } mysql_free_result($result); ?>
  11. What do you mean? ??? Since i am already logged into my database with PhpMyAdmin, and have selected a table to do an insert on, I think it is pretty straight forward, isn't it? Anyone else? Are there any 3rd party MySQL front ends that work well for inserts like this?
  12. what was the problem? I am having the same issue, solution?
  13. I am trying to import a CSV file via phpMyAdmin and I get this error: Invalid field count in CSV input on line 802. The file is called workbook.csv and has 21 fields. The field names in the first row are identical to the names of the database fields. In fact what I did was export a small database with 25 records, and cleared all but the header row, and filled it in with new data, saved it as the same file and tried to import it. It should work! The settings I am using on import are: CSV utf8 character set partial import (allow interrupt) is checked replace table data with file is checked ignore duplicate rows is checked fields terminated by is set to a comma (,) fields enclosed by is set t double quotes fields escaped is set to a backslash (\) rows terminated by is set to auto I have no idea what is causing the error. I have cleared the entire CSV file of all commas, backslashes and single or double quotes... could be empty fields? Do I need to remove the field names at the top of the list? If I try to run it as CSV with LOAD DATA I get this error: #1045 - Access denied for user 'cm_subsdata_1'@'%' (using password: YES) Help?!?!
  14. I have a MySQL database with 200,000 records. The records are filled with customer information like Company Name, First Name, Last Name, Address, City, State, Zip etc. etc... I wrote add record, delete record, edit record, display record etc. pages but I am having trouble with Search. Sometimes we have to get creative with Search to find a user, maybe their name is spelled wrong or they misspelled their city, so we search for First Name and Zip Code to see if we get a hit... so I have a few questions: 1. If I have ten fields, and any given search may use only a few of the search options (text boxes), like First Name and Zip Code, and the others are left blank... how would I write a query that would find results where the First Name and Zip Code match, and ignore any text boxes left blank? I want to avoid a huge long if statement... is there a way to check for if $textbox1 == "" then ignore? 2. Also, on my display record page, if a record has more than one word, it only displays the first word, how can i fix that? Here's the code: $id = $_GET['id']; // Makes initial conection to database define ('DB_USER', 'xxxxx'); define ('DB_PASSWORD', 'xxxxx'); define ('DB_HOST', 'localhost'); define ('DB_NAME', 'xxxxx'); $connect = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error()); $db = @mysql_select_db(DB_NAME, $connect) or die(mysql_error()); // Selects customer data from the database $findcustomer = "(SELECT company, phone, email, firstname, lastname, address1, address2, city, state, zipcode, country, status FROM subscriber_data WHERE id = '$id')"; $findcustomer_result= mysql_query($findcustomer) OR die('QUERY ERROR:<br />' .$findcustomer. '<br />' .mysql_error()); <? while ($row = mysql_fetch_array($findcustomer_result)) { $id = $_GET["id"]; $company = $row["company"]; $phone = $row["phone"]; $email = $row["email"]; $firstname = $row["firstname"]; $lastname = $row["lastname"]; $address1 = $row["address1"]; $address2 = $row["address2"]; $city = $row["city"]; $state = $row["state"]; $zipcode = $row["zipcode"]; $country = $row["country"]; $status = $row["status"]; echo" blah blah "; }
×
×
  • 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.