Jump to content

yarnold

Members
  • Posts

    67
  • Joined

  • Last visited

About yarnold

  • Birthday 08/28/1989

Contact Methods

  • MSN
    yegnold@gmail.com
  • Website URL
    http://www.twixcoding.com

Profile Information

  • Gender
    Male
  • Location
    Worcester, England

yarnold's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Are you on a fixed IP address? If so you could have.. <?php if($_SERVER['REMOTE_ADDR'] == 'xx.xxx.xxx.xxx') { // Logged in } ?> Obviously replacing xx.xxx.xxx.xxx with your IP address.
  2. if(strlen($_POST['email'] > 0)) { // Process form information } else { // The length of the email field was zero, hence an e-mail address was not entered. }
  3. You haven't closed your ' tag have you? echo '<script type="text/javascript"> function changeContent(pos) {'; if (!$autodetect_noscoll) { echo ' centerpos = thumbstwg_offset[parseInt(pos)]; '; } else { echo ' if (thumbstwg_offset.length > ' . (($numberofpics * 2) + 1) . ') { centerpos = thumbstwg_offset[parseInt(pos)]; } '; } echo ' document.sohaform.item_name.value = ' . $image . '; reload=0; changeContentWait(pos);'; }
  4. Try using if(!array_key_exists('PHP_AUTH_USER', $_SERVER)) { // Your code here }
  5. To solve this problem using your solution, would mean that the sites you're "updating" remotely would have huge security risks associated with the process - instead of a phone number you could put malicious javascript and destroy their web page (even if only it's appearance.) It is unlikely that any sites would allow you to do it. I believe that it is possible to update lots of sites at the same time (in the same way that confused.com queries lots of different insurance company websites for quotations), however such a solution would probably be incredibly complex. I certainly wouldn't like to try it from scratch...
  6. You could use sessions to record the last submit date of the form. So, when the form processes, at the top of the form add <?php session_start(); if((array_key_exists('LastPostTime', $_SESSION) && (($_SESSION['LastPostTime'] + 60) <= time()) === false) { //Process form } $_SESSION['LastPostTime'] = time(); ?>
  7. Also if I were you I would replace $_REQUEST with $_POST... It's a little more secure.
  8. In the second file, add "session_start()" on the line before you try to echo out the session variable. session_start() needs to be exected at the top of ALL pages that call or set session variables.
  9. Does that not do the same as what I have in my .htaccess file at the moment? <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([_a-zA-Z0-9]+).php $1.php5 [L] </IfModule>
  10. Thanks. I will look into finding a more suitable web design image later on... I have changed the navigation so that the problem you outlined no longer exists (increased text-indent). I will also look at rephrasing my summary paragraphs, thanks for that point! Thank you for your kind comments
  11. Hi all At the moment, my client's web host only supports PHP5 when using .php5 as the file extension. For the moment I have worked around this by using .htaccess to rewrite .php to .php5. However, this means that whenever I upload the site to the server, I must go through all of the files directly accessed and change the file extensions to .php5. I was wondering if there is a line I could put into .htaccess to make apache "think" that .php extension files ARE .php5? Cheers for any help Ed
  12. <html><head><title>AlibreCam Verification System</title></head> <center><h3>AlibreCam Verification System</h3></center> <center><TABLE border=0 cellpadding=3><form name="input" action="verification.php" method="get"> <tr><td><center>Customer ID:</center></td> <td><input type="text" name="user"></td></tr> <tr><td colspan=2><center><input type="submit" value="Submit"></center></td></tr> </form><br></table><br> <?php include("connectioninfo.php"); $customer = $_GET['user']; $query= sprintf("SELECT * FROM invoiceid WHERE customerid=%s,$customer"); $query= mysql_real_escape_string($query); $cResult = mysql_query($query); $value=0; while($row=mysql_fetch_array($cResult)){ $value=$value+$row['numoflicenses']; } echo "Total number of licenses purchased: ".$value; ?> </html>
  13. There's another if statement that needs to be closed before your final closing tag, I believe.
×
×
  • 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.