Jump to content

lipun4u

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

About lipun4u

  • Birthday 03/19/1987

Contact Methods

  • Website URL
    http://kodeyard.blogspot.com/

Profile Information

  • Gender
    Not Telling
  • Location
    Bhubaneswar

lipun4u's Achievements

Member

Member (2/5)

0

Reputation

  1. I have been trying to implement a captcha in php... here is the code.. <?php // Set the content-type header('Content-type: image/png'); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> But in the browser, it gives the following error... Somebody tell me the reason and how to fix this ..
  2. Can somebody give me a link for any RSS related PHP library ??
  3. that will be time consuming. it returns 1062 error code(in my case....) is this the universal error code for duplicate record insertion ??
  4. In my database, after insertion of records, I want to know if the record inserted is duplicate or not. How can I do this ??
  5. Give me some minutes...to make a strip-down-version as it contains some legacy code...
  6. That's the problem, I also don't see any '<'. Before this, I am also including 2 include_once(), will this affect the line number ???
  7. the required function is defined... <?php function array_key_exists_r($keys, $search_r) { $keys_r = split('\|',$keys); foreach($keys_r as $key) if(!array_key_exists($key,$search_r)) return false; return true; } ?>
  8. the error is... Parse error: syntax error, unexpected '<' in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\submit.php on line 44 line 44 is $_SESSION['user_id']=$row[0];
  9. What is the error in the below code ??? <?php if(array_key_exists_r('email|password', $_POST)) { include_once('database.php'); $sql = "SELECT user_id FROM login WHERE user_name = '" . trim($_POST['email']) . "' AND password='" . trim($_POST['password']) . "')"; $result = mysql_query($sql); print_r($result); if (mysql_num_rows($result)>0){ $row = mysql_fetch_row($result); session_start(); $_SESSION['user_id']=$row[0]; $_SESSION['user_name']=trim($_POST['email']); } } ?>
  10. how much u suggest to keep the length ???
  11. My version is... mysql> select version(); +------------------+ | version() | +------------------+ | 5.1.32-community | +------------------+ 1 row in set (0.02 sec) mysql> If I remove the primary key and not null, everything is fine. What should I do ??
  12. I have arequirement that a table has to contain 3 columns, user_id, url and name. I want to make the url primary key. Go throw the following sql query. mysql> CREATE TABLE blog_details ( -> user_id INT(11), -> blogname VARCHAR(1024), -> blogurl VARCHAR(1024) NOT NULL, -> PRIMARY KEY(blogurl), -> FOREIGN KEY (user_id) REFERENCES login(user_id) -> ON DELETE CASCADE -> ); ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes How can I fix the above error ???
  13. I want to make a dropdown list in php which will contain the names of all countries. Please help me..
  14. I know the fundamentals and also can code. But the problem is that If I write the code it won't nice and attracting.... So I need some IDE ??
×
×
  • 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.