Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by floridaflatlander

  1. http://ago.tanfa.co.uk/css/examples/menu/tutorial-h.html ... I think you can make it work with this
  2. I like coppermine, in fact I like it a lot. If you use it make sure you look at the docs and search for your problem first before posting on the forum, its just the nice thing to do. It took me a little while to learn all the buttons but once I did I like it. You can bridge it with about a dozen different forums and use the pics else where in a site once you know the path names. Or you can build one, a book called PHP Solutions has a good one with step by step instructions, the first edtion is for sale for cheap on Amazon. The new one is geared more towards Objects and classes.
  3. It worked like a charm. I tried to just add AND smf_members.id_group = '9' OR find_in_set('9', smf_members.additional_groups) and I couldn't get it to work. I just added AND find_in_set('9', smf_members.additional_groups) and it only pulled from the one (csv)column. I put your sql code in and it worked, Thanks S
  4. I have a test sql query like the one below that works fine SELECT columns FROM table2, smf_members WHERE table2.id_member = smf_members.id_member AND smf_members.id_group = '9' ORDER BY member_name; However smf has group membership in a column called id_group and a column called additional_groups which holds CSVs. Can I write a SELECT query and change smf_members.id_group = '9' to query both the id_group column and the additional CSVs column for a group #. I need this to print out a table using while loop.
  5. You have more than one "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />" ? That's your problem? I have something a little like yours, mine is basically include the switch, switch then defines $css then <link rel="stylesheet" type="text/css" href="../css/<?php echo $css; ?>" />
  6. It's -http://www.website.com/folder/index.php <- your main page for the folder (if you have one) -http://www.website.com/folder/page1.php -http://www.website.com/folder/page2.php and so on You (or at least I do) build these types with a get statement and guery -http://www.website.com/index.php?p=1 -http://www.website.com/index.php?p=2 PS as cyberrobot said, pages like -http://www.website.com/index.php?p=1 pull info from the database
  7. When this happens to me it's because I didn't use an opening tag and the code was turned into text. Under welcome I saw this code with no opening php tags, if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ID, ‘image-link’, true); ?> I also see you have over 800 post so you probably already know this.
  8. Someone with more experience may have another idea but can you use something like str_replace before you enter the variables into the query?
  9. Do you have your form set to where it will only submit when all the varliables are set? If so maybe something like $var = ""; will work when it is placed at the end of your code. It would be like $var = 1; the script starts running enters the data in the dtabase, then $var gets redifined to $var = ""; just before the closing php tag (?>), this way when your script tries to run again the $var is not defined and the script wont run. Or you can do a check for double entry.
  10. Basicly for the laymen, if the other server requires "localhost" for the Database on that server the answers is no. If there is another name besides "localhost" like coustomer_..._...._...company_com you may be able to.
  11. Like I said I'm new to this and work within what I've done before, Here's how I think would do it, of course I haven't tested it. // Get a random # $result = "SELECT * FROM totem_ads"; $result = mysqli_query ($dbc, $result); // Connect to the database connection defined in your include() & run the query $result = mysql_num_rows($result); // This gets the number of rows $random_row = rand(1, $result); // If a row is deleted ot missing your rand() will show a null if it lands on it. // Use the random number to get a random row $randon_row = "SELECT * FROM totem_ads WHERE rownum(column_name) = $random_row"; // is rowmun a column ? $ad_sql = mysql_query($dbc,$random_row); // Connect again to the database defined in the include() .. while($row_advert = mysql_fetch_array($ad_sql)) ---------- Someone with more experience may have more info or be able to trim this up a bit. -------------------------------------- Use an echo statement some where on your page to see if your getting a $random_row value, echo "$random_row"; My suggestion is to play with it, I've spent a half a day on stuff like this only to find out it was something very simple.
  12. God bless the Dyslexic, there's a bunch of us.
  13. I'm begining PHP too so take this with some salt. Where are you connecting to the database? Do your rows have id's ? Are they auto increments? You "may be able to" use a query something like this $q = "SELECT COUNT (column name ) FROM totem_ads"; $r = mysqli_query ($dbc, $q); // Run the query $random_row = rand(1, $r); or $q = "SELECT * FROM totem_ads"; (I used the same as you to get a number) $r = mysqli_query ($dbc, $q); // Run the query $num = mysqli_num_rows($r); // Count records $random_row = rand(1, $r); What are you going to do if you delete a row? Do you have a query to run rand() again it hits a deleted row?
  14. On your local host, make a form, and enter your data. Then write the code to display the enteries, than write code to edit the entries, then work on security for your site. If you're the only one entering data, that will be easy. If you have multple people entering ads(like I hope to do one day), that's another story. You may want to follow this http://www.phpfreaks.com/forums/application-design/idea-for-classified-ads-website/msg1523976/
  15. Some of these are free and/or for a small price, some look really nice. I tried the almond lite (the one for free) on my local host and looked at the code and saw my password in a file and not proccessed by sha or md5 and not in the database. Of course the almonds you pay for may not do that. http://www.hotscripts.com/category/php/scripts-programs/classified-ads/general/
  16. This is interesting, I always thought the browser would render the page to make the table above but I cut and pasted the html in a file and looked at it in my browser and nothing happened (it looked the same). Isn't this a bit like safe html, does the server format the code before sending it to the browser ? I tried a space, in the same page and it worked fine.
  17. Your form may look something like this, of course you also may have to change a few values here and there <form action="movie.php" method="post"> ( or form action="<?php echo $_SERVER['PHP_SELF']; ?>" ) <table class="table"> <tr> <td colspan="2"> <h1>Page Title</h1> </td> </tr> <tr> <td> <p>Title:</p> </td> <td> <p><input type="text" name="Title" size="20" maxlength="80" /></p> </td> </tr> <tr> <td> <p>URL:</p> </td> <td> <p><input type="text" name="url" size="20" maxlength="100" /></p> </td> </tr> <tr> <td> <p>Category:</p> </td> <td> <p><input type="text" name="category" size="20" maxlength="20" /></p> </td> </tr> <tr> <td colspan="2" align="right"> <input type="submit" name="submit" value="Enter" /> </td> </tr> </table> </form>
  18. I think this is what he was talking about Maq
  19. To me head first is squirrelly. I bought, head first, Larry Ullman's php6 & 5 and Ullman's php 3rd edition in that order. It was all French to me until I got Ullman's php 3rd edition, it's for people just starting out with php. Some people don't like Ullman's two column style but it's Okay with me. It's a beginners book and it's to the point with the info in it that you asked for in your post. If I had it all to do over again with my skill set, I'd go Larry Ullman's php 3rd edition. then Larry Ullman's php6 & 5 and/or Luke Welling & Laura Thomson's PHP & MySQL. Also I just got David Powers PHP Solutions and it's great. It's like you build a site with a photo gallery with thumbs nails and a simple content management system, it addresses style also, kind of like the Zend css stuff. It also talks about problems that can arise when multiple people upload info to your site and how to fix the problems(some of these problems weren't addressed by Ullman or Welling/Thomson). Even though it's simple it is not for people without php experience. If you went from Larry Ullman's php 3rd edition, then David Powers PHP Solutions you may be pleased, in fact with your back ground you may be able to go straight to Powers' book. Powers' php solutions first edition is available on the web and for cheap at amazon.
  20. People do this all the time, If you have no experience with php and were like me, 20 plus years since I did any coding, you're in for a long road but you'll get there. If you don't have the time you maybe able to hire someone.
  21. I'd do it like this $result1 = mysql_query("SELECT id, namn, url FROM stuff ORDER BY id desc limit 1;") $link1 = $result1; $result2 = mysql_query("SELECT id, namn, url FROM stuff ORDER BY id desc limit 1,1;"); $link2 = $result2; <html> <a href="<echo ''.$link1.'';?>"> <p class="note-general"> The first link </p></a> <a href="<echo ''.$link2.'';?>"> <p class="note-general"> The the second link </p></a> </html> (should the href be inside of the p tag?)
  22. I tried the free down load of Microsoft expressions 4. Of course the css is great but the php editor has something missing. It's colors are pretty but when you try to find a closing bracket or parenthesis to a condition it doesn't highlight them like other programs, also you can't collapse conditions either. If someone is using this, am I doing something wrong? Does Expression 4 highlight brackets and parenthesis? I'm thinking of buying Nu-sphere as a php editor but wanted to double check expressions because of its css editing and just to see if I was doing anything wrong. I know I could post this on their forum and I was a member, but it's been about 6-7-8 months since I posted anything and they want me to re-register and get a windows live ID to post. Soooo here I am. Thanks in advance S
  • 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.