omarh2005
Members-
Posts
23 -
Joined
-
Last visited
Never
Everything posted by omarh2005
-
Code to take photo from scanner immediately
omarh2005 replied to omarh2005's topic in PHP Coding Help
I'm referring to scanner device (hardware) -
Code to take photo from scanner immediately
omarh2005 replied to omarh2005's topic in PHP Coding Help
Thank you premiso But I need to give order to the scanner to take a picture instead of browsing photo -
Hi for all; Is there a way or code that can take a picture of the scanner to the site immediately, rather than on the browse the picture Thanks in advance
-
My database on the web !! then, How can restore the backup if my web hosting company does backups daily and how know that my web hosting company does backups ?! Note: I can't call them and email them (hosting company) Wait reply
-
My backup is very old
-
I'm deleted tables in my database by mistake :-\ please help me how restore the tables with data thank you in advance
-
Thank you very much
-
Hi I have problem with query when put ' in the textarea field and press send to save in database , refuse the saving is there function in php ignore ' in the query ??!!
-
Best method for parsing data between pages?
omarh2005 replied to sorenchr's topic in PHP Coding Help
You may process fields with javascripts for speed and the confirmation from the important fields in seperate php file -
Finding text three characters before chosen string
omarh2005 replied to eits's topic in PHP Coding Help
<? $html='123<beforethis>test<hh>test</hh>s9<beforethis>'; $arr=explode("<beforethis>",$html); foreach($arr as $key=>$value){ $digit=substr($value,strlen($value)-2,2); $digit=ereg_replace("[^0-9]","",$digit); if($digit !=""){ print $digit."<br>"; } } ?> -
try to replace this code $insertpost = "INSERT INTO posts_groups (gid, gname, uid, uname, post, month, day, year) VALUES ('$id', '$groupname', '$userid', '$username', '$userpost', '$month', '$day', '$year')"; by this code $insertpost = "INSERT INTO posts_groups (gname, uid, uname, post, month, day, year) VALUES ('$groupname', '$userid', '$username', '$userpost', '$month', '$day', '$year')"; but you ought to enable auto increment for the table
-
Change this old code to a loop...help needed.
omarh2005 replied to smeguru's topic in PHP Coding Help
Hi smeguru Try this <? for($i=1;$i<=5;$i++){ if (isset($pagesetting['leftside']['section'.$i])) { include ($_SERVER['DOCUMENT_ROOT']."/shared-resources/sidesection.".$pagesetting['leftside']['section'.$i].".inc.php"); } } ?> -
Try this <? if(isset($_GET['wrong_code25'])){ header( "refresh: 3; url=http://{$_SERVER['SERVER_NAME']}/index.php" ); ?> <table><tr><td> Thank you for registration.<br /> Wait, you are redirecting to login page.<br /> </td></tr></table> <? }?>
-
[SOLVED] Passing checkbox information to another php page
omarh2005 replied to jeaker's topic in PHP Coding Help
try this: reply else if($_POST['sameaddress'] == 'on') to else if($_POST['sameaddress'] == 'sameaddress') -
[SOLVED] 2 forms, only 1 seems to be working?
omarh2005 replied to MasterACE14's topic in PHP Coding Help
maybe ought to change name of the hidden field in the two form echo "<input type=\"hidden\" name=\"act\" value=\"uss\" />"; to another name like echo "<input type=\"hidden\" name=\"act1\" value=\"uss\" />"; -
[SOLVED] Passing checkbox information to another php page
omarh2005 replied to jeaker's topic in PHP Coding Help
what method of form ?!! maybe better if you put the full code -
use such this $q = "SELECT * FROM `users` WHERE `username` = '".$_POST['name']."' and `password` = '".$_POST['password']."';"; $s = mysql_query($q) or die("error selecting"); $a = mysql_fetch_array($s); if($a['username']){ $name = $a['username']; $grant = $a['grant']; session_register('name'); session_register('grant'); header("Location:main.php"); }else{ header("Location:index.php"); }
-
[SOLVED] The specification of the good code
omarh2005 replied to omarh2005's topic in PHP Coding Help
what your openion with this function ?! function fun_add($tab,$id,$iman,$lenght,$error,$succ) { if ($id==0){//its insert function ! $res=("insert into $tab ()values()"); mysql_query($res); $id=mysql_insert_id(); }//end if // Get table Info $res1=mysql_query("desc $tab "); $c=0; while ($row1=mysql_fetch_array($res1)){ $c=$c+1; $fname[$c]= $row1[0]; } //2 to the first field acept id $q="update $tab set "; for ($i=0; $i<$lenght ; $i++) { $fi=$i+2; $q.="$fname[$fi]= '".$iman[$i]."' "; if($i!=$lenght-1) $q.=","; } $q.=" where id = '".$id."'"; //print $q; mysql_query($q) or die("not query"); if ( mysql_affected_rows()>0) { header("location:"."$succ"); exit; } else { header("location:"."$error"); exit; } } //$iman =array("hi","iman",125,"wo"); //iman_add("test",2,$iman,4,"error.php?a=1","view.php"); -
[SOLVED] The specification of the good code
omarh2005 replied to omarh2005's topic in PHP Coding Help
Which the best and faster from where the code ?! To write general add function usable in all websites(include many parameters), Or To write private add function usable in only a one website (less parameters) and in another website change it -
Hello for all what are the sepecification of the good code