Jump to content

ali_2kool2002

Members
  • Posts

    111
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ali_2kool2002's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. can someone help me i was wondering if its possible to NOT show the date modified when i go onto my localhost? is there a way to do this?
  2. Hi can someone code two radio buttons and output an error if they are not selected...hope someone can help me as iv tried but cant make it work... thanks anyone who can help!! :-*
  3. Hi can someone tell help me as the code below doesnt check properly if the two variables are the same, it keeps saying they are the same even if the variables are different: <? $choosepass = 'a'; $confirmpass= 'df'; if('$choosepass' == '$confirmpass'){ ?> <script language="Javascript"> alert ( "Passwords must be the same-Please try again") </script> <? } else{ ?> <script language="Javascript"> alert ( "Passwords same") </script> <? } ?>
  4. Hi can someone explain how the code works so at least i know how php does it instead of just using it from here the first code checks if there are no numbers in the text field for name but what do those characters in preg match mean same applies for how does the email validation work? Thanks for anyone to crack this cheers : if ( !preg_match('/^[a-zA-Z\" "]*$/', $yname) ) { error('Name is not Valid.\\n'. 'Please try again.'); }Repeat it for every text box u want to validate. Use this for email validation: Code: if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $yemail)){ error("Invalid e-mail address"); }
  5. Hi can someone tell me how the code below works? im not sure what preg_match does with all those characters after it ? ??? ??? foreach ($_POST as $k => $v) { if (preg_match('|^sub_([\d]+)\z|', $k, $match)) { $button = $match[1];
  6. ohhh i see... something new learnt again..! thanks
  7. P.S. REMOVING THE SURROUND CODE DID THE JOB....wonder why it didnt work with it...thanks once more again barrand!
  8. AT LAST THE HARD WORK HAS PAID OFF... thanks Barrand....i realy really appreciate your hard work and consisstent help throughout the course of this whole procedure from start to end....great help!! thank you! I fee like sending you a gift ! thanks! :) ;D
  9. Array ( [GD Version] => bundled (2.0.28 compatible) [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => 1 [GIF Read Support] => 1 [GIF Create Support] => 1 [JPG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => [XBM Support] => 1 [JIS-mapped Japanese Font Support] => ) ITS THE SAME I THINK
  10. yes same folder the code that i have used from urs is in the exact format as below: UNTITLED2.PHP <html> <head> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META http-equiv="content-language" content="en"> <META name="author" content="Barand"> <META name="generator" content="PHPEd 4.5"> <title>Bar sample</title> </head> <body> <table width="884" border='1'> <tr> <td width="122"> Item A </td> <td width="58"> 20 </td> <td width="303"> <img src='bar.php?val=20&max=50' border="0"> </td> </tr> <tr> <td height="42"> Item B </td> <td> 40 </td> <td> <img src='bar.php?val=40&max=50'> </td> </tr> <tr> <td> Item C </td> <td> 30 </td> <td> <img src='bar.php?val=30&max=50'> </td> </tr> <tr> <td> Item D </td> <td> 50 </td> <td> <img src='bar.php?val=50&max=50'> </td> </tr> </table> </body> </html> bar.php <!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=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php // set dimensions $w = 102; $h = 12; // create image $im = imagecreate($w, $h); // set colours to be used $bg = imagecolorallocate($im, 0xE0, 0xE0, 0xE0); $black = imagecolorallocate($im, 0x00, 0x00, 0x00); $barcolor = imagecolorallocate($im, 0xFF, 0x00, 0x00); // draw border imagerectangle($im, 0,0,$w-1,$h-1,$black); // get value and max value from query string $val = isset($_GET['val']) ? $_GET['val'] : 0; $max = isset($_GET['max']) ? $_GET['max'] : 100; // calculate dimensions of inner bar $barw = $max ? floor(($w-2) * $val / $max) : 0; $barh = $h - 2; // draw inner bar if ($barw) imagefilledrectangle($im, 1, 1, $barw, $barh, $barcolor); // send image header header("content-type: image/png"); // send png image imagepng($im); imagedestroy($im); ?> </body> </html>
  11. if i take the gd2.dll file from the php.net site it says the function is not recognised but if i use the one thats allready on my system the above random txt comes up... i think i need an extension for the png file ?
  12. the notices have gone but all i get if i go onto bar.php is : ‰PNG IHDRf íÞ Í PLTEàààÿ‡½ß°IDATxœcÅp‘(…; úÙ[Fã\IEND®B`‚ and the other normal html that uses bar.php displays the table but doesnt seem to be able to retrieve the bar.php in the last coumn... does it work on your system?
  13. bar.php is on this site below: http://www.phpfreaks.com/forums/index.php/topic,133944.msg563734.html#msg563734
×
×
  • 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.