Jump to content

voip03

Members
  • Posts

    693
  • Joined

  • Last visited

Everything posted by voip03

  1. location replace http://www.w3schools.com/jsref/met_loc_replace.asp
  2. please mark as solved. the topic solved button can be found at the bottom left of the page
  3. is it help full. <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- h1 { display: inline; } em{ font-size:12px;} --> </style> </head> <body> <div align="center"> <h1 >Start of paragraph<em>and here is the rest of the paragraph.</em></h1> </div> </body> </html>
  4. What do you have in ' require("class.phpmailer.php");'?
  5. <script language="javascript" type="text/javascript"> var var1 = "<?php echo $phpVariable; ?>"; </script> Just bit adjustment
  6. I really like to know more about SQL injection and PayPal express check out API, can any one guide me. It will be very help full to me.
  7. I really like to know more about SQL injection and PayPal express check out API, can you give me some guide line. It will be very help full to me.
  8. http://www.w3schools.com/php/php_file_upload.asp this is my working example. <? if($_POST['submit']) { if($_FILES['file_up']['name'] == "")//File has a value { header("Location:".$config_basedir."loadimage.php?e=1");exit; } elseif($_FILES['file_up']['size'] == 0)// size is legitimate { header("Location:".$config_basedir."loadimage.php?e=2");exit;} //This function reads the extension of the file. It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } $filename = stripslashes($_FILES[file_up]['name']); //get the extension of the file in a lower case format $extension = getExtension($filename); $extension = strtolower($extension); //if it is not a known extension, we will suppose it is an error and will not upload the file, //otherwise we will do more tests if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message header("Location:".$config_basedir."loadimage.php?e=4");exit; } //Set maximum file size. if ($_FILES[file_up]>15000) { header("Location:".$config_basedir."loadimage.php?e=3");exit; } # Renaming the upload file. //This line assigns a random number to a variable. $ran_name = rand () ; //This takes the random number you generated and adds a . on the end, so it is ready of the file extension to be appended. $ran_name = $ran_name."."; //This combines the directory, the random file name, and the extension $newfile_name = $ran_name.$extension; // the path with the file name where the file will be stored, upload is the directory name. $add="c://xampp/htdocs/iTraining/image/$newfile_name"; if(move_uploaded_file ($_FILES[file_up][tmp_name], $add)) { $updsql = "UPDATE customers SET image='".$newfile_name."' WHERE id=".$_SESSION['SESS_USERID'].";"; $updres = mysql_query($updsql); if(!$updres) { die(" Could not query the database ORDERS 3 : <br/>". mysql_error() ); } header("Location:".$config_basedir."index.php");exit; } else { header("Location:".$config_basedir."loadimage.php?e=5");} } else { switch($_GET['e']) { case "1": $error= "<strong> Fields are empty </strong> <br/>"; echo "<br/><div align='center'> "; show_error($error); echo "</div><br/>"; break; case "2": $error= "<strong> File Size is not Valid </strong> <br/>"; echo "<br/><div align='center'> "; show_error($error); echo "</div><br/>"; break; case "3": $error= "<strong> Your uploaded file size is more than 150KB so please reduce the file size and then upload. <br/> Visit the help page to know how to reduce the file size.<BR> </strong> <br/>"; echo "<br/><div align='center'> "; show_error($error); echo "</div><br/>"; break; case "4": $error= "<strong> Unknown extension! </strong> <br/>"; echo "<br/><div align='center'> "; show_error($error); echo "</div><br/>"; break; case "5": $error= "<strong> Failed to upload file Contact Site admin to fix the problem </strong> <br/>"; echo "<br/><div align='center'> "; show_error($error); echo "</div><br/>"; break; } ?> <FORM ENCTYPE="multipart/form-data" ACTION="loadimage.php" METHOD=POST> <h4>Upload the image: <INPUT NAME="file_up" TYPE="file"> <INPUT TYPE="submit" name="submit" VALUE="Send File"></h4> </FORM> <? } ?>
  9. you need jQuery http://vandelaydesign.com/blog/web-development/jquery-drop-down-menus/
  10. START FROM HERE https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECSimpleIntegration http://www.paypalobjects.com/en_US/ebook/PP_NVPAPI_DeveloperGuide/expresscheckout.html https://www.x.com/blogs/easypaypalwithphp/tags/php if you want to build custom payapl expres check out I will help u
  11. You have an error in your query. It isn't returning a valid resource. Print out $query, execute it in phpmyadmin/mysql. Then you ll know what's the error. You can also give die(mysql_error());
  12. You have an error in your query. It isn't returning a valid resource. Print out $query, execute it in phpmyadmin/mysql. Then you ll know what's the error. You can also give die(mysql_error());
×
×
  • 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.