Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Not as far as i am aware.. all the speed detected do basically the same thing as you current script.. EDIT: the larger the number of bytes you use for the speed test the closer to the true speed. for JAVA solution would probably work better!... as for the current script maybe adding a header to clear the cache header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false);
  2. yep syntax is ok BUT DO double quotes header("Location: http://msdsimaging.com/sidemo/request_3.php?INDEXB=$VAL"); as INDEXB would equal $VAL not its value with single quotes
  3. increase those at a guess max-execution-time 300 memory_limit 32m post-max-size 16m
  4. Right.. NOW were on the access rights you need to change the access rights(permissions) to the upload folder find the folder and click set permissions (or something) your probably see 9 tick boxes, tick all of them click apply/update/save
  5. OK done <?php $Checked = false; if (isset($_POST['submit'])) { $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $confirmemail = $_POST['confirmemail']; $projecttype = $_POST['projecttype']; $projectdetail = $_POST['projectdetail']; if ( !empty($firstname) && !empty($firstname) && !empty($email) && !empty($confirmemail) && !empty($projecttype) && !empty($projectdetail)) { if(isset($_POST['submit'])) { $to = "mark@invent-designs.com"; $subject = "Submission from www.invent-designs.com"; $firstname_field = $_POST['firstname']; $lastname_field = $_POST['lastname']; $email_field = $_POST['email']; $projecttype_field = $_POST['projecttype']; $projectdetail_field = $_POST['projectdetail']; $body = "From:\n First Name: $firstname_field\n Last Name: $lastname_field\n E-Mail: $email_field\n Project Type: $projecttype_field\n Project Details: $projectdetail_field"; $Checked = true;//Checked mail($to, $subject, $body, "From:$email_field"); } else { echo "blarg!"; } } else { $error = true; } } ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style2 {font-size: 10px} .style4 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; } .style6 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; } body { background-color: #A40000; margin-left: 0px; margin-top: 0px; } a:link { color: #000000; text-decoration: underline; } a:visited { text-decoration: underline; color: #666666; } a:hover { text-decoration: none; color: #666666; } a:active { text-decoration: underline; color: #000000; } --> </style> </head> <body> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table width="680" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th scope="col"><img src="splash.gif"><br> <br></th> </tr> <tr> <th scope="row"><span class="style6">Fill out the from below and we can email you a quote based on the <br> description of your project below...<br> </span></th> </tr> </table> <table width="680" border="0" align="center" cellpadding="0" cellspacing="0"> <tr align="left" valign="top"> <th width="80" scope="row"><div align="left" class="style4">First Name </div></th> <th width="600" scope="row"> <div align="left"> <input name="firstname" type="text" class="style2" id="firstname" value="<?php echo $firstname; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($firstname) ) { echo 'Error! Please enter a first name.<br>'; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Last Name </div></th> <th scope="row"><div align="left" class="style2"> <input name="lastname" type="text" class="style2" id="lastname" value="<?php echo $lastname; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($lastname) ) { echo 'Error! Please enter a last name.<br>'; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Email </div></th> <th scope="row"><div align="left" class="style2"> <input name="email" type="text" class="style2" id="email" value="<?php echo $email; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($email) ) { echo 'Error! Please enter a valid email address.<br>'; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Confirm Email </div></th> <th scope="row"><div align="left" class="style2"> <input name="confirmemail" type="text" class="style2" id="confirmemail" value="<?php echo $confirmemail; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($confirmemail) ) { echo 'Error! Please re- enter a valid email address.<br>'; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Project Type </div></th> <th scope="row"><div align="left" class="style2"> <select name="projecttype" id="projecttype" class="style2"> <option value="0" <?php if (empty($yearofbirth)) echo "selected"; ?>>- Select -</option> <option value="Logo Creation">Logo Creation</option> <option value="Flash Intro/Design">Flash Intro/Design</option> <option value="Website Creation">Website Creation</option> <option value="Website Re-Design">Website Re-Design</option> <option value="Print Design (flyer, business card, ect.)">Print Design (flyer, business card, ect.)</option> </select> <span class="style4"> <?php if ( $error==true && empty($projecttype) ) { echo 'Error! Please select project type.<br>'; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Project Details </div></th> <th valign="top" scope="row"><div align="left" class="style2"> <textarea name="projectdetail" cols="45" class="style2" id="projectdetail"><?php echo $projectdetail; ?></textarea> <span class="style4"> <?php if ( $error==true && empty($projectdetail) ) { echo 'Error! Please enter complete details of your project.<br>'; } ?> </span></div></th> </tr> <tr> <th colspan="2" scope="row"> <div align="left"> <input type="submit" name="submit" value="Submit"> </table> </form> <?php if($Checked) { echo '<span class="style6"><div align="center"><br>Thanks for your interest in our services '; echo $_POST['firstname']." ".$_POST['lastname']."! We will reply within 24-48 hours. "; echo '<a href="">Click here to go back</a></b></div></span>'; } ?> </body> </html>
  6. file is too big change to if($_FILES['file']['size'] < 2000000)
  7. whats being displayed on the page ? can you also repost the form and the php code again (in code tags #) also i assume the filename of the php code is uploadfinish.php
  8. quick update <?php if (isset($_POST['submit'])) { $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $confirmemail = $_POST['confirmemail']; $projecttype = $_POST['projecttype']; $projectdetail = $_POST['projectdetail']; if ( !empty($firstname) && !empty($firstname) && !empty($email) && !empty($confirmemail) && !empty($projecttype) && !empty($projectdetail)) { if(isset($_POST['submit'])) { $to = "mark@invent-designs.com"; $subject = "Submission from www.invent-designs.com"; $firstname_field = $_POST['firstname']; $lastname_field = $_POST['lastname']; $email_field = $_POST['email']; $projecttype_field = $_POST['projecttype']; $projectdetail_field = $_POST['projectdetail']; $body = "From:\n First Name: $firstname_field\n Last Name: $lastname_field\n E-Mail: $email_field\n Project Type: $projecttype_field\n Project Details: $projectdetail_field"; } else { echo "blarg!"; } } else { $error = true; } } ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style2 {font-size: 10px} .style4 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; } .style6 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; } body { background-color: #A40000; margin-left: 0px; margin-top: 0px; } a:link { color: #000000; text-decoration: underline; } a:visited { text-decoration: underline; color: #666666; } a:hover { text-decoration: none; color: #666666; } a:active { text-decoration: underline; color: #000000; } --> </style> </head> <body> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table width="680" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th scope="col"><img src="splash.gif"> </th> </tr> <tr> <th scope="row"><span class="style6">Fill out the from below and we can email you a quote based on the description of your project below... </span></th> </tr> </table> <table width="680" border="0" align="center" cellpadding="0" cellspacing="0"> <tr align="left" valign="top"> <th width="80" scope="row"><div align="left" class="style4">First Name </div></th> <th width="600" scope="row"> <div align="left"> <input name="firstname" type="text" class="style2" id="firstname" value="<?php echo $firstname; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($firstname) ) { echo 'Error! Please enter a first name. '; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Last Name </div></th> <th scope="row"><div align="left" class="style2"> <input name="lastname" type="text" class="style2" id="lastname" value="<?php echo $lastname; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($lastname) ) { echo 'Error! Please enter a last name. '; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Email </div></th> <th scope="row"><div align="left" class="style2"> <input name="email" type="text" class="style2" id="email" value="<?php echo $email; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($email) ) { echo 'Error! Please enter a valid email address. '; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Confirm Email </div></th> <th scope="row"><div align="left" class="style2"> <input name="confirmemail" type="text" class="style2" id="confirmemail" value="<?php echo $confirmemail; ?>" size="37"> <span class="style4"> <?php if ( $error==true && empty($confirmemail) ) { echo 'Error! Please re- enter a valid email address. '; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Project Type </div></th> <th scope="row"><div align="left" class="style2"> <select name="projecttype" id="projecttype" class="style2"> <option value="0" <?php if (empty($yearofbirth)) echo "selected"; ?>>- Select -</option> <option value="Logo Creation">Logo Creation</option> <option value="Flash Intro/Design">Flash Intro/Design</option> <option value="Website Creation">Website Creation</option> <option value="Website Re-Design">Website Re-Design</option> <option value="Print Design (flyer, business card, ect.)">Print Design (flyer, business card, ect.)</option> </select> <span class="style4"> <?php if ( $error==true && empty($projecttype) ) { echo 'Error! Please select project type. '; } ?> </span></div></th> </tr> <tr align="left" valign="top"> <th scope="row"><div align="left" class="style4">Project Details </div></th> <th valign="top" scope="row"><div align="left" class="style2"> <textarea name="projectdetail" cols="45" class="style2" id="projectdetail"><?php echo $projectdetail; ?></textarea> <span class="style4"> <?php if ( $error==true && empty($projectdetail) ) { echo 'Error! Please enter complete details of your project. '; } ?> </span></div></th> </tr> <tr> <th colspan="2" scope="row"> <div align="left"> <input type="submit" name="submit" value="Submit"> </table> </form> <?php if(isset($_POST['submit'])) { echo '<span class="style6"><div align="center"> Thanks for your interest in our services '; echo $_POST['firstname']." ".$_POST['lastname']."! We will reply within 24-48 hours. "; echo '<a href="">Click here to go back[/url]</div></span>'; } ?> </body> </html>
  9. OK .. thats doesn't make much sense to me, MD5 can't be "decrypted" storing the username for use on the login screen is fine.. password well a litte 2way encryption is always an idea but that can be reversed. simple idea.. would be to store the hashed password and on the login if the password is 32 char then don't MD5 it.. your have to put a password limit of 31 chars.. just an idea personally i wouldn't store the password in any format in a cookie anyways thats for another thread lol
  10. just wondering why not do something simple like SELECT * FROM `images ` WHERE active='Y' ORDER BY RAND() ASC LIMIT 0,4
  11. be carefull of security risks
  12. can you post that code then!!
  13. whats the problem now? you getting the same results? as for access rights.. the data isn't being sent yet so theirs nothing to write!
  14. as a note:
  15. only a long time
  16. change <form method="post" action="uploadfinish.php"> File: <input type="file" name="file"> <input type="submit" value="Upload!"> to <form method="post" action="uploadfinish.php" enctype="multipart/form-data"> File: <input type="file" name="file"> <input type="submit" value="Upload!"> </form>
  17. i think the problem is in the loginUser function also try changing $error = '0'; to $error = ''; but as i said i think thats not really the problem
  18. i don't think its the GDversion but i would suggest breaking the script up into 3 scripts 1. upload 2. create 300 image 3. create 140 image (from the 300 image) maybe link them via header("Location: next.php); see if that helps, as you are putting a lot of stress on server with 1 script..
  19. POST your form.. as its not sending and $_FILE data
  20. move if(isset($_REQUEST['button'])){ echo $_POST[ic]; mysql_query("UPDATE Person SET ic = '$_POST[ic]' where username='$login'"); } just under echo "loginname=".$_SESSION['loginname']; $login=$_SESSION['loginname']; echo "<br/>"; echo "loginvariable=".$login;
  21. try this. <?php echo "<pre>";print_r($_FILES); if($_FILES['file']['size'] < 20000) { if($_FILES['file']['error'] > 0) { echo "We have found a error: " . $_FILES['file']['error'] . "<br />"; }else{ echo "File: " . $_FILES['file']['name'] . "<br />"; echo "Type: " . $_FILES['file']['type'] . "<br />"; echo "Size: " . $_FILES['file']['size'] . "<br />"; if(file_exists("upload" . $_FILES['file']['name'])) { echo "Sorry, " . $_FILES['file']['name'] . "already exists. "; }else{ move_uploaded_file($_FILES['file']['tmp_name'], "upload/" . $_FILES['file']['name']); echo "Stored in: http://www.liam-monks.com/upload/" . $_FILES['file']['name']; } } }else{ echo "Invalid File!"; } ?> whats returned
  22. easy to miss
  23. set the limit to 1 $nfs = preg_replace($matches[1],$textareas,$fs, 1); limit The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
  24. Is this the correct section for this ? 1. print(); 2. that php was installed <?php phpinfo(); ?> 3. how to read the manual!
  25. sasa would be faster than ProjectFear as were all doing one heres mine <?php $data = "Call Out Fee for 10:00 on 20/8/2007"; if (preg_match('%(\d+:\d+)[\D]*([\d/]{8,10})%si', $data, $regs)) { echo $regs[0]; echo "<br />time is "; echo $regs[1]; echo " date is "; echo $regs[2]; } ?> NOTE: $regs[0] is the full string $regs[1] is the time $regs[2] is the date
×
×
  • 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.