Jump to content

floridaflatlander

Members
  • Posts

    671
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by floridaflatlander

  1. I haven't done anything like that but I have added picture info to js. I did it just like it was html <div id="loadarea"> </div> while { echo '<a href=".$variable." rel="enlargeimage" rev="targetdiv:loadarea, trigger:click" title="'.$row['pic_info'].'" >'; } It uses a loop and loads the last eight pics and displays in loadarea.
  2. I've been using echo'<p>'.str_replace("\n", "</p>\n<p>", $descrip).'</p>'; To echo strings and I noticed the string looks likes this <p>String is here </p> So I changed it to echo '<p>'.str_replace("\r\n", "</p>\n<p>", $descrip).'</p>'; and the strings look like I want it to look, like this <p>String is here</p> I googled what is the difference between \r and \n and usually people start saying one is for windows one is for linex, one is old the other newer ... My questions are, when using php what do you enter at the end of a string when you press enter? And can I use "\r\n" just as will as "\n" and it not come back and bite me (put everything in one big paragraph)?
  3. I've been wrting this are the bottom of a script header("Location: $home/index.php"); mysqli_free_result($r); mysqli_close($dbc); exit(); I was wondering can exit() remove a querys overhead and close a database connection also, meaning this is the same thing. header("Location: $home/index.php"); exit(); php.net says exit() "Terminates execution of the script". So maybe it closes the db connection(a script) but leaves a query's overhead??
  4. I sure there are others others that can give you more details but it's used to manage your mysql databases and tables. With phpmyadmin you can add delete or edit databases and tables.
  5. Okay uploaded the new csv file to my db table and the equal sign is gone. Thanks
  6. No I just down loaded a new csv file and it wasn't in it, so something must of messed up the first time I did it. Thanks
  7. Thanks for the reply The data came from here http://federalgovernmentzipcodes.us/ the smaller file, it's a csv file and I checked they're in the csv file. So this is an error and isn't suppose to be like this? Anyway I don't see why there would be an equal sign in the city field. I think I can fix this easy enough, I'll be back and mark solved when done. Thanks
  8. Odd when I use $q = "SELECT * FROM zip_codes WHERE city LIKE 'WHITEHOUSE =\r\nSTATION'"; on a php file page I made it works and returns WHITEHOUSE = STATION when I use WHITEHOUSE =\r\nSTATION using my phpmyadmin search it returns "returned an empty result set" and ... SELECT * FROM `zip_codes` WHERE `city` LIKE 'WHITEHOUSE =\\r\\nSTATION' with the extra back slashes in the query.
  9. I have a zip code table and the field for city names has an equal sign in them when there are two or more names like this WHITEHOUSE = STATION I've used phpmyadmin to test/play with seach using LIKE ... WHITEHOUSE STATION, WHITEHOUSE =STATION, WHITEHOUSE =\nSTATION, WHITEHOUSE = STATION, and get no result. This seems like it would mess up searches, why would they have equal signs in the city names and how would I search for something like WHITEHOUSE STATION when it's WHITEHOUSE = STATION? There are 8,637 records with an equal sign in the city names. How can I search for a city with an equal sign in the name or can I REPLACE(remove) the equal sign and it's new line charactor(if that's what it is) like this? UPDATE zip_codes set city = replace (city, ' =\n', ' '); Any thoughts, thanks.
  10. Then something is wrong. If comments and the todo divs are inside the stuff div all you need to do is put a margin on the stuff div. I strongly suggest you do as ChristianF and I suggested and use firebug, chrome or opera so you can see what is happening. Your stuff div is not floated and it contains floated divs, this means it collapses and has no height. /*your code now*/ .stuff { no float } #todo_list { float: left; } #comments { float: right; } all you have to do is float the stuff div too and put a margin on it.
  11. If your going to do stuff like this get and use firefoxes firebug, firebug color codes the divs, margins and padding on the web page so you can see the styles, it will tell you what the css file name is, the name of the style, what line the style is coming from and the inheritance if any. I think chrome does the same thing. But try adding a bottom margin to stuff
  12. Open firebug click the html the tab(you'll have html, css, script tabs etc.) then the div tags until you get to the tags in question. Firebug well tell you where the style is coming from, what the css file name is, what line the style is coming from, the inheritance if any and the name of the style. It also color codes the style on the web page so you can see the styles. Also plug your css in here http://jigsaw.w3.org/css-validator/ and your html in here http://validator.w3.org/ and see what they say (you should always do this). Sometimes and extra semicolon, bracket or missing closing html tag can throw things off in one browser but not another.
  13. I would think that would work, do you/did you use Firefox's fire bug to see if there is something interfering with your styles?
  14. I set a session with the captcha value sha1 'pass_phrase' then // $_POST user_phrase from captcha if (isset($_POST['image'])) { $user_pass_phrase = sha1($_POST['image']); } then if ($_SESSION['pass_phrase'] == $user_pass_phrase)
  15.  <!DOCTYPE html> <html lang="en"> <?php include('include/header.php'); ?> I'm assuming you have doctype info in header.php
  16. sorry try $url = $_SERVER['HTTP_HOST'];
  17. I think this is it $url = dirname($_SERVER['PHP_SELF']); be sure to clean it with htmlentities or strip_tags and if you're inserting into a db mysqli_real_escape_string
  18. They are a blast. We were also lucky, all three of ours, they were two years apart, would sleep through the night from the start. , thank God
  19. Same here, I started with books that were a step above this had problems then backed up and ordered Ullman's PHP Visual QuickStart Guide.
  20. So you didn't get an error message? I thought mysqli_query() expects 2 parameters, you have one Try $result=mysql_query($dbc, $sql) or die("Error: ".mysqli_error($dbc)); where $dbc = mysql_connect("$host", "$username", "$password")or die("cannot connect");
  21. Plug this in and see what it tells you, $result=mysql_query($sql) or die("Error: ".mysqli_error($dbc)); where $dbc = mysql_connect("$host", "$username", "$password")or die("cannot connect");
  22. A variable starts with a dollar sign and uses letters numbers and underscores, After the $ sign it must be a letter or an underscore.
×
×
  • 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.