Jump to content

swharrell

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

swharrell's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Do you have a link to the actual search.php? I would like to see it's output.
  2. I assume you are wanting to display a specific div based on the users input. Try: <form name="form" action="<? echo $_SERVER['PHP_SELF']; ?>" method="post"> <input type="text" value="" name="input"> <input type="submit" name="submit" value="submit"> </form> <?php $num = $_POST['input']; switch ($num){ case 'one': echo '<div class="example_box">one</div>'; break; case 'two': echo '<div class="example_box">two</div>'; break; case 'three': echo '<div class="example_box">three</div>'; break; case 'four': echo '<div class="example_box">four</div>'; break; default: echo 'Default'; break; } ?>
  3. I changed the email address for my existing account. When I received the activation email in the new email account I clicked the link to re-activate and received an error. After reviewing the link http://www.phpfreaks.com/forums/activate/?u=89834;code=5c87153085 I saw the problem. The semicolon. I copied and pasted the link into the address bar and replaced the semicolon with an ampersand and was successfully re-registered. Just letting you know so that someone can look at the email template.
  4. OK. Let's attack this from a different angle. When I look at the source of stigros.com the code below is what I (and the browser) see's. <link href="styles/main.css" rel="stylesheet" type="text/css" /> <table width="100%" border="0" height="80" cellpadding="4" bgcolor="#000000" > <tr> <td width="81%" height="76" valign="top"><p><span class="stigrosheadfont"><strong>www.StigRos.com</strong></span><strong><span class="headnocrap"><br /> ( No Crap - Just Quality Movie & Music Downloads )</span></span><br /> <a href="http://stigros.com" class="headerlinkcolor">Home</a> | <a href="register.php" class="headerlinkcolor">Register</a> | <a href="#" class="headerlinkcolor">Contact us</a></strong></td> <td width="19%" valign="top"><div align="center"> <div align="center"><span class="stigrosheadfont"><strong>Disclaimer</strong></span></div> <div align="center"> <div style="padding:5px; margin:auto; background-color:#000"<b>1 visitors online</div> February 26, 2011</div></td> </tr> </table> <!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>Stigros.com</title> <link href="styles/main.css" rel="stylesheet" type="text/css" /> </head> <body> <html> <style type="text/css"> #form1 strong { color: #F00; } body { margin-top: 0px; } </style> <body> <form id="form1" name="form1" method="post" action="index.php"> <div align="center"> <p><strong></strong><br /> <span class="blacktext">Your Name:<br /> <input name="username" class="blacktext" type="text" id="username" size="36" maxlength="32" value="" /> <br /> <br /> Your Email: <br /> <input name="email" class="blacktext" type="text" id="email" size="36" maxlength="32" value="" /> <br /> <br /> Your Message: <br /> <textarea name="msg" class="blacktext" id="msg" cols="36" rows="5"></textarea> <br> <br /> Human Check: <input name="humancheck" type="text" id="humancheck" value="Please remove all of this text" size="38" maxlength="32" /> <br /> <br /> <input name="button" type="submit" class="blacktext" id="button" value="Send Now" /> </div> Several things about this are wrong any of which 'might' cause the issue. So, let's look at getting the generated html correct first and then if the problem still exist we can go from there knowing that is not the problem.
  5. finestice. I may be wrong (wouldn't be the first time) but in the 10th line of your countertest.php file it appears you are asking if a file does not (!) exist, then open the file. if(!file_exists($dataFile)) { $fp = fopen($dataFile, "w+"); fclose($fp); } Edit: Sorry, my bad. Didn't see the w+. But that does bring up another question, is the file being created? Also, have you looked at the generated code to see if anything is being written from the includes?
  6. Set the countertest.php as a variable and then call the variable in the table: <? session_start(); ?> <link href="/styles/main.css" rel="stylesheet" type="text/css" /> <? //get data $button = $_GET['submit']; $search = $_GET['search']; $search = strtoupper($search); $countertest = include_once 'countertest.php'; $header = ("<table width='100%' border='0' height='80' cellpadding='4' bgcolor='#000000' > <tr> <td width='39%' height='76' valign='top'><p><span class='stigrosheadfont'><strong>www.StigRos.com</strong></span><strong><span class='headnocrap'><br /> ( No Crap - Just Quality Movie & Music Downloads )</span></span><br /> <a href='http://mysite' class='headerlinkcolor'>Home</a> | <a href='register.php' class='headerlinkcolor'>Register</a> | <a href='#' class='headerlinkcolor'>Contact us</a></strong></td> <td width='47%' valign='bottom'><p class='normalblacktext'>You are currently logged in, <b>$_SESSION[username]</b></td> <td width='14%' valign='top'><div align='center'> <div align='center'><span class='headfont'><strong>Disclaimer</strong></span></div> <div align='center'>" . $countertest . "</div></td> </tr> </table>");... If this doesn't work also do what samshel suggested.
  7. cunoodle2, I had thought about using flash but wanted to stay away from it if possible. ChemicalBliss, Thank you. That is very helpful. I will give it a try and also do some more research on 'anti-leaching'.
  8. You have nested php tags. <? include_once 'countertest.php'; ?>
  9. I previously asked this question in the Apache Server forum with no reply so I'm thinking maybe that was the wrong area to post it in. I have a directory with media files in it (mp3's, videos etc.) that I want to secure from being downloaded yet be able to be played by a local player on the site. I was thinking of trying to secure the directory using .htaccess and .htpasswd files. I would then like to have the page the player is on pass the login credentials to allow the media files to be played. I do not want the user to be prompted for login credentials but if they tried to access the directory to download a file they would be denied. The server is (of course) Apache 2.2.17 and the scripting languages are php (version 5.2) and jQuery. Is this possible or am I going about this the wrong way? Thanks in advance. P.S. Yes, I have extensively searched for answers before posting but could not find the answer I was looking for.
  10. OK. I know I will probably get slammed with links and "did you try Google?" but honestly, I have and I can not seem to find a solution. I have an .htpasswd protected directory that I would like to allow my users to access ONLY through a web page. I would like for this (Php) page to pass the username and password to the server without the user being prompted. This will allow them to view the files but, if they typed in the URL to a file in the directory they would be denied access directly to the file. How can I accomplish this and am I going about this the right way? Thanks
  11. RESOLVED! When using php in CGI mode on a Windows IIS server make sure you have also installed and enabled FastCGI. Also run through the manual installation steps for FastCGI. It seems that even though I ran the FastCGI installer and the scripts not all the changes were implemented. After running through the manual installation and entering the values to the IIS metabase and the fcgiext.ini file everything now works. FastCGI installation instructions: http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60 Also, contrary to popular belief and recommendations for fixing authentication issues with php and IIS, after reading the comment from Bill Staples in his blog ”Mime types *are not* used for dynamic content, so you should never configure the Web server mime types to serve PHP, or IIS is likely to serve out your source code as plain text.” Good to know. Thanks Bill.
  12. We are running a Windows 2003 Server with IIS6 and Php 5.2.11 in CGI mode with FastCGI enabled. This is in a Windows domain and and I am having a problem with our Intranet site. I have secured a directory on the site using Integrated Windows Authentication. A valid authorized domain user can access the directory and any pages within it without any problem but, a valid unauthorized domain user receives a 404 error page immediately when trying to access a php page within the directory. If the unauthorized user attempts to access an html page they are correctly presented a login prompt. I need to figure out why the attempt to access a php page is generating a 404 error instead of presenting them with a login prompt. The html and php pages I have tested are empty with the exception of the proper tags (head, body, etc..) so no includes, links or anything like that. All other php files in other non-secured directories work. Yes, I have searched the forum and not found an answer but if I missed it, please point me to it. Yes, Php is an allowed MIME type.
×
×
  • 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.