Jump to content

whynot

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Everything posted by whynot

  1. I found s3captcha captcha jquery plugin. this worked perfectly but i have a problem. my project not in english language and in this plugin images set with english Prefix. in act fruit images ( apple.jpg ,lemon.jpg etc... ) or general images ( rss.jpg , folder.jpg etc ... ) and for captcha message u see this : Verify that you are a human, please choose folder , apple (EXT NAME OF JPG). now if i change message i need to change Prefix images. this not worked because my language not support images prefix. so i need to replace prefix name images to my language . e.x: please select hoş . hoş = apple or çıkan = folder in images. There is a way? thanks For Any Help. setup plugin : $values = array('apple','strawberry','lemon','cherry','pear'); // image names // $imageExt = 'jpg'; // images extension // $imagePath = 's3images/'; // images path // $imageW = '33'; // icon width // $imageH = '33'; // icon height // Desc of owner : ( my problem ) HTML : <form name="demo" action="verify.php" method="post"> <div id="capcha"> <?php include("s3Capcha.php"); ?> </div><br /><br /><br /> <input type="submit" value="Submit" /> </form> s3captcha.php : <?php session_start(); include("s3Config.php"); $rand = mt_rand(0,(sizeof($values)-1)); shuffle($values); $s3Capcha = '<p>Verify that you are a human, please choose <strong>'.$values[$rand]."</strong></p>\n"; for($i=0;$i<sizeof($values);$i++) { $value2[$i] = mt_rand(); $s3Capcha .= '<div><span>'.$values[$i].' <input type="radio" name="s3capcha" value="'.$value2[$i].'"></span><div style="background: url('.$imagePath.$values[$i].'.'.$imageExt.') bottom left no-repeat; width:'.$imageW.'px; height:'.$imageH.'px;cursor:pointer;display:none;" class="img" /></div></div>'."\n"; } $_SESSION['s3capcha'] = $value2[$rand]; echo $s3Capcha; ?> THANKS
  2. I insert multiple id from my checkbox to mysql database using php post form. in e.x i insert id (checkbox value table test) to mysql. no i need to any function for retrieve data from mysql and print to my page with my e.x output.(print horizontal list name of table test where data = userid) my checkbox value ( name table is test ) : 01 ---id----- name ---- 02 ---1 ----- test1 ---- 03 ---2 ----- test2 ---- 04 ---3 ----- test3 ---- 05 ---4 ----- test4 ---- 06 ---5 ----- test5 ---- 07 ---6 ----- test6 ---- 08 ---7 ----- test7 ---- 09 ---8 ----- test8 ---- 10 ---9 ----- test9 ---- mysql data Insert ( name of table usertest ): 1 ---id----- data ---- userid ----- 2 ---1 ----- 1:4:6:9 ---- 2 ----- 3 ---2 ----- 1:2:3:4 ---- 5 ----- 4 ---3 ----- 1:2 ---- 7 ----- example outout : ( print horizontal list name of table test where data = userid ) print? 1 user id 2 choise : test1 - test4 - test6 - test9 Thanks
  3. Thanks ManiacDan. Really, the results are confusing. I'm confused. i have database Prefix (my_ ) for mysql tables. Which tables need to have a prefix(my_ )? how to print list ? while loop? For greater clarity
  4. you right. so Now, I Change This To : ID -- NAME -- country -- stats -- town -- DATEJOIN -- ACTIVE 1 -- TEST -- 1 -- 2 -- 3 -- 20110101 -- 1 2 -- TEST1 -- 1 -- 2 -- 3 -- 20110101 -- 1 3 -- TEST2 -- 1 -- 3 -- 5 -- 20110101 -- 1 4 -- TEST3 -- 1 -- 7 -- 6 -- 20110101 -- 1 Now, How To Count And print list of country/stats/city. Thanks
  5. I insert data in mysql table row using multiple method : 1#2#3 . 1 is ID of country, 2 is Id of state, 3 is ID of town . now i have this table for real estate listings. for each list(home) i have country/state/town (1#2#3). in country table i have list of country - in country table i have list of state - in country table i have list of town. i need to The number of houses in country / state / town . my mean is : USA [ 13 ] <!-- This Is equal of alabama+alaska+arizona --> ----Alabama [8] <!-- This Is equal of Adamsville+Addison+Akron --> -------Adamsville [2] -------Addison[5] -------Akron[1] ......(list of other City) ----Alaska [ 3 ] -------Avondale[3] ......(list of other City) ----Arizona [ 2 ] -------College[2] ......(list of other City) Lisintg Table : ID -- NAME -- LOCATION -- DATEJOIN -- ACTIVE 1 -- TEST -- 1#2#3 -- 20110101 -- 1 2 -- TEST1 -- 1#2#3 -- 20110101 -- 1 3 -- TEST2 -- 1#3#5 -- 20110101 -- 1 4 -- TEST3 -- 1#7#6 -- 20110101 -- 1 Country Table : id -- name 1 -- USA stats Table : id -- countryid -- name 1 -- 1 -- albama 2 -- 1 -- alaska 3 -- 1 -- akron town Table : id -- countryid -- statsid -- name 1 -- 1 -- 1 -- adamsville 2 -- 1 -- 1 -- addison 3 -- 1 -- 1 -- akron Thanks For Any Help.
  6. for print html : What's Better, Faster and Optimized ?!? echo "<tr height=\"22\"> <form action = \"{$URL}/admin/edit.php\" method=\"POST\"> <input type=\"hidden\" name=\"login\"> <td width=\"15%\" bgcolor=\"$bgcolor\"> <input type = \"text\" name = \"login\" value=" . $f['login'] . "></td> <td width=\"15%\" bgcolor=\"$bgcolor\"> <input type = \"password\" name = \"password\" value=" . $f['pass'] . "> </td> </form> </tr>"; With PHP Method 2 : ( single ) echo ' <tr><form action = "' . URL . '/admin/editadmins.php" method="POST"> '; echo ' <td align="left" valign="top"><input type = "text" name = "login" value = "' . $f['login'] . '"></td>'; echo ' <td align="left" valign="top"><input type = "password" name = "password" value = "' . $f['pass'] . '"></td></form></tr>'; Method 3 : (With Html And Php echo ) <tr height="22"> <form action = "../admin/editadmins.php" method="POST"> <td align="left" valign="top"><input type = "text" name = "login" value = "<?PHP echo $f['login']; ?>"></td> <td align="left" valign="top"><input type = "text" name = "password" value = "<?PHP echo $f['pass']; ?>"></td> </form> <tr> Thanks.
  7. Hi, I have This Function For Two backgrounds row of table : function background() { $bg = ''; // odd $bg2 = 'F3F3F3'; // even if ( $i%2 == 0 ) $bgs = "$bg"; else $bgs = "$bg2"; return $bgs; } PHP CODE IS : echo "<TABLE>"; $i = 0; while ($f = $db->fetcharray( $r )) // for fetch { background(); // function echo "<tr> <td bgcolor=\"{$bgs}\">$id</td> <td bgcolor=\"{$bgs}\">$name</td> <td bgcolor=\"{$bgs}\">$date</td> </tr> "; $i++; } echo "</table>"; But This Not Worked. What's Problem ? Thanks
  8. Hi, I have This Url After Click Link For Access and download file . index.php?module=Files&action=show&id=default&download=yes&id=$_REQUEST[id] I set my mod_rewrite to : RewriteRule ^files/(.*)/?$ index.php?module=Files&action=show&id=default&download=yes&id=$1 in download page i have this for accept & download file : if ($_REQUEST[download] == 'yes') { //check and create MYSQL Result echo " <meta http-equiv=\"refresh\" content=\"0; url=$cms[url]\">"; // $cms[url] = test.jpg } Now generate url (domain.com/files/test.jpg) but not refresh and not show file for download ( new Page)! what's problem ! thaks for any help
  9. I wirte this code for 4 * 4 : echo "<div><ul>"; $c = 1; $media = mysql_query("SELECT * FROM " . "$prefix" . "screen where id=\"$id\" order by id desc limit 16"); while ($cms = mysql_fetch_assoc($media)) { if (!($c%4)) echo ($c!=0 ? "</ul>" : "")."<ul>"; echo "<li><a href=\"#\"><img src=\"#\"></a></li>\n"; $c++; } echo "</ul></div>\n"; for ($cnt=$c;$cnt%4>0;$cnt++); ?> Html output is : <UL> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> </UL> <UL> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> </UL> <UL> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> </UL> <UL> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> <li><a href=\"#\"><img src=\"#\"></a></li> </UL> <UL> <li><a href=\"#\"><img src=\"#\"></a></li> </UL> This is false . actually i need to each <UL> 4 <LI> . What's problem ! Thanks.
  10. i create while loop But I'm not sure how to act
  11. Hi, Mary Christmas My result of mysql database is LIMIT 8; now i have to retrieve and show this to two Horizontal columns As each columns 4 result. how to generate this Without tables!! only with DIV or UL/LI list . Thanks
  12. Thanks, This Nicely worked. I had previously worked with this method. My Problems when $data = 0 ; using 0 - 20 not show li 0 active. i change to this : $i=1;$i <=21 . Actually B1 = 0 B2 = 1 .............. . i need to show active class for 0 if $data = 0. How to Fix This Big Problem ?!
  13. This Not worked ! your code worked for static li_number ( only 13 ) ! $ROW=['li_number'] Any value can be . example : 2 - 2.5 - 8.5 - 10 - 7
  14. Hi, My output in html is : <uL><li id="B1"></li> <li id="B2"></li> <li id="B3"></li> <li id="B4"></li> <li id="B5"></li> <li id="B6"></li> <li id="B7"></li> <li id="B8"></li> <li id="B9"></li> <li id="B10"></li> <li id="B11"></li> <li id="B12" class="active"></li> <li id="B13" class="no"></li> <li id="B14" class="no"></li> <li id="B15" class="no"></li> <li id="B16" class="no"></li> <li id="B17" class="no"></li> <li id="B18" class="no"></li> <li id="B19" class="no"></li> <li id="B20" class="no"></li> </ul> If MySQL query result is equal to `6`, then `<li>` tag with `id` equal to "`B12`" should have class "`active`". All the `<li>` elements occuring after this active element should have class "`no`". This shows images of horizontal rating between `0` and `10` and between 0.5 Example : 0 .5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 In the example above elements from `0` to `5` will be blue, element `6` will be white and elements from `7` to `10` are black. How could I generate this using PHP and/or MySQL? Thanks, XXXX chirstmas XXXX
×
×
  • 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.