Jump to content

voyde

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Posts posted by voyde

  1. 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.

     

  2. 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?

  3. <?	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>
    

  4. 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

  5. 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?

  6. 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)

     

     

  7. 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?

  8. 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.