Jump to content

voyde

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by voyde

  1. That doesnt work it just keeps making one line with the most recent data.
  2. Ok I need a flat file to hold one variable... ten different times. A user submits let say their name, the script adds the users name into the flat file erasing the one at the bottom (so there is only 10 at a time). What i got... $filename = $configpath.'lastten.txt'; if (!$handle = fopen($filename, 'r+')) { $error = "Cannot open file ($filename)"; exit; } if (fwrite($handle, $direct_link) === FALSE) { $error = "Cannot write to file ($filename)"; exit; } fclose($handle); How on earth do i get it to write the latest at the top and remove the what once was number 10.
  3. Ok well how in a form input do i retain the breaks? I.E on the way into the database.
  4. I dont seem to follow.... <textarea cols="40" rows="20" name="text"><?=$text?></textarea> do i convert it into a nl2br(String) before i send it to the DB? or when im trying to read the DB
  5. I need some help... If someone enters data into a form a textbox, with multiple lines how can I get PHP to convert each new line into a <br /> so when it saves to the database it automatically has the proper spacing?
  6. Yes but on form submission.
  7. I dont see how those will improve search results.
  8. thanks but I have tried that already with no luck. its mysql 5.0.45 and i cant figure it out on it.
  9. Currently: $sql = "SELECT * FROM lyrics WHERE lyric LIKE '%$q%' ORDER BY id DESC limit $startat,$search_perpage"; Its ordered by descending id, i need it to order by relevance. so the more times $q is found the closer it put it to the top of the results. any ideas?
  10. <? if (isset($_POST['submit'])) { $site = $_POST[status]; header('Location:' . $site .''); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Redirect from forms</title> </head> <body> <form method="post" action=""> <center> <table width="600" cellpadding="0" cellspacing="0"> <tr> <td> <table> <tr> <td><b>I need:</td> <td> </td> <td><select name="status"> <option value="-SELECT-">-SELECT-</option> <option value="http://google.com">On Site Support</option> <option value="http://yahoo.com">Website Development</option> </select> <input type="submit" name="submit" value="submit" /></td> </tr> </table> </td> </tr> </table> </form> </body> </html>
  11. Your index page needs to be something along the lines of.... <? // MAIN PAGE // Put the pages into variables $x = $_GET[x]; $plan = $_GET[plan]; if ($x=="reseller")) { if (empty($plan)) { include ".some/reseller/page.php"; } elseif ($plan=="mega") { include "./some/page/to/mega.php"; } elseif ($plan=="super") { include "./some/page/to/super.php"; } } else { include "./path/to/homepage.php"; } ?> Like I said SOMEthing like that
  12. On a form submit the out put is.... site.com/?s=bananas&q=coconuts&p=1 how to get it on submit to.... site.com/bananas/coconuts/1 ? Thanks
  13. what about google adsense? or bidvertiser, how would i know how much a click costs?
  14. Ok in a nut shell.... User is going to submit something.... asks for paypal email... submits the information, shown on a certain page after approval... Tricky Part: the ads on the page, once click how to give credit to the user? after certain amount of money is collected from the ad's the money is paypal'ed to the users paypal account. Possible?
  15. I got most of it, however when it comes to a file name i am having some problems... .htaccess: Options +FollowSymLinks RewriteEngine On rewriteRule ^([A-Za-z]+)/?$ index.php?p=$1 [L] rewriteRule ^([A-Za-z]+)-([A-Za-z]+)/?$ index.php?p=$1&type=$2 [L] rewriteRule ^([A-Za-z]+)-([A-Za-z]+)/([*.])$ index.php?p=$1&type=$2&file=$3 [L] The url used to look like: http://www.thesite.com/p=page&type=images&file=file.RAR with the above mod_rewrite: http://www.thesite.com/page-images/ but when i need to put a file in... http://www.thesite.com/page-images/file.RAR page not found or file missing. i need the full file name but cant figure it out. thanks. (P.S I have searched google high and low)
  16. Pages, For example I have 202 files in a given folder, how can I make each page have ten? And if thats not possible how would i go about showing the latest ten.
  17. I have tried all those, did you read all of my question? I need pages out of them! (with no database)
  18. Hi, I am in the process of making a site but cannot figure out how to make a file list from a directory, with pages? There is no database of these files. Any thoughts? Or at least a show ten random files?
  19. Lets say i have a page, and in that page i have a url a hyperlink if you will. The link inside the page is Http://www.somesite.com/index.php?topic=385 How do i get JUST the number 385? I have tried some splits but end up with the first part but not the part i need. Remember this is inside a page already displayed.
  20. Normally I can figure these things out but i am stumped on this one... Its for a forum and part of the main sites design is to show recent news and recent discussions on the same table but with alternating backgrounds so the template looks like this... <table width="560" cellpadding="0" cellspacing="0"> <tr class="minit1" align="center" width="280"> <td class="recenttext" width="280" align="left"> <b>"[b]Latest Discussion #1[/b]"</b> </td> <td class="recenttext" width="280" align="right"> <b>"[b]Latest News #1[/b]"</b> </td> </tr> <tr class="minit2" align="center" width="280"> <td class="recenttext" width="280" align="left"> <b>"[b]Latest Discussion #2[/b]"</b> </td> <td class="recenttext" width="280" align="right"> <b>"[b]Latest News #2[/b]"</b> </td> </tr> </table> Its longer than that (goes to latest news/discussion 6) The table is not only interlocking with each other but also changing colors after each row. How do you think i could do this? I got the latest news to work (coming from a seperate mysql DB) but cannot get the latest discussion to work into the table (yes i can get it) Thanks
×
×
  • 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.