Jump to content

PeggyBuckham

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by PeggyBuckham

  1. I have been using a simple script for login information to be stored in the session array. The problem with the code I have been using is it only destroys the session if the user refreshes the page. I would like the page to automatically log the user out if there is no activity. Here is the code I have been using: ini_set('session.gc_maxlifetime',300); ini_set('session.gc_probability',1); ini_set('session.gc_divisor',1); session_start(); if($_SESSION['admin_login'] != $password){ header('Location: index.php'); exit(); }
  2. I want to retrieve the field names from a database with the associated values. I know how to retrieve the values but haven’t figured out how to get the field names. Here is the code I use to get the values. $sql='SELECT * FROM table WHERE table_id =' .$id; $result = mysql_query($sql,$db) or die(mysql_error(). "<br/>SQL: $sql"); $row = mysql_fetch_array($result); if($row){ foreach ($row as $key => $value){ if(!empty($value)){ print '<p>'.$value.'</p>'; } } }
  3. I want to retrieve the field names from a database with the associated values. I know how to retrieve the values but haven’t figured out how to get the field names. Here is the code I use to get the values. $sql='SELECT * FROM table WHERE table_id =' .$id; $result = mysql_query($sql,$db) or die(mysql_error(). "<br/>SQL: $sql"); $row = mysql_fetch_array($result); if($row){ foreach ($row as $key => $value){ if(!empty($value)){ print '<p>'.$value.'</p>'; } } }
  4. Problem solved Yea Godaddy. They disabled my php5.ini and now it works. I thought I had to use php5.ini instead on php.in. Not really sure about all of that just glad it works and they were really helpful
  5. In answer to jdavidbakr The upload breaks at 2MB. 1.9MB works and 2.1MB does not. I'm pretty sure that that is the default right? So I think I will call the tec people at GoDaddy becousse that is where it is hosted. My guess is that it is not reading the php5.ini right even though the information generated from the phpinfo(); said differently.
  6. I have made a page with <?php phpinfo(); ?> the result reads: max_file_uploads=8M post_max_size=8M Anybody have another idea?
  7. okay I am sort of new at this what apache? I sure that it is running on a lynx server.
  8. I want to allow for a user to upload any photo that they might have taken from their camera. I can't get photo's with large file sizes to upload. I have changed the setting in the php5.ini and set the settings extremely high. This has always worked for me before. I also have changed the code on the form. <input type="hidden" name="MAX_FILE_SIZE" value="99000000" /> here is the code for the php5.ini register_globals = on allow_url_fopen = on expose_php = Off max_input_time = 500 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so register_long_arrays = on max_file_uploads = 8M post_max_size = 8M Maybe the problem is not in the php5.ini ?
  9. I've set up a system for my client to dynamically make a web page. Now what I'm working on is the best way to send that page out in an email. I tried using an I frame, but I noticed that some browsers don't accept iframes. Here is my code: if($_POST['send_email']){ $to = 'mememe@yahoo.com'; $subject = 'Test Test'; $message = '<p>Having trouble reading this email? <a target="blank" href="http://www.example.com/email.php?id='.$row['id'].'">View it on your browser</a><br/><br/></p><iframe src="http://www.example.com/email.php?id='.$row['id'].'" style="border:none;background:#bedae5;margin:auto;" name="test" width="100%" height="500px"></iframe>'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: noreply@example.com' . "\r\n"; mail($to, $subject, $message, $headers); }
  10. This isn't really a php question it is actually a seo question. I'm not exactly sure what Google considers a mirrored site. I/we had a web site that was using a shopping cart software with templates and it was hard to tweek the keywords to change with each page. So I made a new site using the same database. So I'm worried that Google will consider these mirrored sites. The file structure is different and the new site has a different page for each product. When the old site has one page (product.php) that displays all the products. What is the same on each site is the description of the products and the price. I would really appreciate any feedback on this.
×
×
  • 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.