- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
22 Posted Topics
Re: okey check that new version of the function: function login_check($login_email, $login_password){ $login_email = mysql_real_escape_string($login_email); $login_query = mysql_query("SELECT COUNT(`user_id`) as `count`, `user_id` FROM `users` WHERE `email`='$login_email' AND `password`='$login_password' ") or die (mysql_error()); $row=mysql_fetch_array($login_query);//new lines $cnt=0 $cnt=intval($row["count"]); > return ($cnt>0) ? $row["user_id"] : false; } | |
Re: Hello,pls check the username field in the table must be unique and in the condition may intiate $row=0; and use "$row >= 1" instead of "$row == 1", it should worked: <?php $hostname = 'localhost'; $dbname = 'phplog'; $username = 'root'; $password = ''; mysql_connect($hostname, $username, $password); mysql_select_db($dbname); $use = … | |
Re: check this : <form action="" method="post" > name:<input name="fullname" size="25"> username:<input name="username" size="25"> password:<input type="password" name="password" size="25"> repeatpassword:<input type="password" name="repeatpassword" size="25"> <input type="submit" name="submit" value="Register"> </form> <?php if(isset($_POST['submit'])) { //form data $fullname = strip_tags (@$_POST['fullname']); $username = strip_tags (@$_POST['username']); $password= strip_tags(@$_POST['password']); $repeatpassword = strip_tags(@$_POST['repeatpassword']); $date =date("Y-m-d"); if ($submit) { // … | |
Re: > fopen Hiii ,May you like to know about fopen here [Click Here](http://php.net/manual/en/function.fopen.php),read about it,i think you can use "w" or "x" instead of "a". but instead of all that , if you use header function is better than file system functions: <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); … | |
![]() | Re: i think the scope resolution operator "::", called using :: .the double colon, is a token that allows access to static, constant, and overridden properties or methods of a class. in this example below : class Cart { private function __construct() {} /** * Fetch Cart instance * * @return … |
Re: comment line 9 and replace $query with $result,becuase you can't execute query twice ,check this code: > $result=mysql_query("SELECT * FROM setup WHERE id=".$_SESSION['id']); > //$result = mysql_query($query); excute this ,the error will be disapear. %%^Murtada^%% | |
hello,I Need RSA system code with javascript ,i heared there're some rsa libraries in the internet , i looked for it , and i found some thing but it's not what i look for , i look for library applied (PKCS #1 v2.1) or (PKCS 12 v1.0),i have project and … | |
Re: line 45: > $uploadResponse = "File Upload Complete!<br /> The file has been saved as ¥".$_REQUEST["listname"]."¥ and will be displayed as ¥".$listnameNice."¥<br /><br />"; | |
Re: hiiii, check that code: <?php $iname=$_FILES["pimg"]["name"]; if((@move_uploaded_file($_FILES["pimg"]["tmp_name"],"C:\images/pt/".$iname))) echo "<script>alert('!Data inserted successfully!!');</script>"; ?> in the form the method="POST" ,and enctype="multipart/form-data" input name is "pimag" : <form enctype="multipart/form-data" action="" name="formp" method="POST" > <input type="file" name="pimg" id="pimg" > <input name="snd" type="password" value="Upload"> </form> ** note** :the folder c:\images/pt must be exist. %%^Murtada^%% | |
hii..I have proplem of converting datatype from decimal to float to show it in view from table: [CODE] create table st_fees(s_no int(4) primary key,s_name varchar(50), reg_fs decimal(5,2),study_fs decimal(8,2),curr int(1)); [/CODE] and my view creation code is [CODE] create view sum_fs as select s_no ,s_name,reg_fs+study_fs as fees,curr from st_fees; [/CODE] the … | |
Re: hiiiiiii,the only way is to use ajax technic...you can't execute php function in client side(static) .... Thanks... %^^%Murtada%^^% | |
Re: Hiiii,,,check this: [CODE] <?php $con = mysql_connect("localhost","root","root"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("pqs", $con); $ref1 = $_POST['$ref1']; $result = mysql_query("SELECT * FROM userdb WHERE User_tcno = '$ref1' LIMIT 0, 1",$con); ?> <form name="form1" method="post" action="view_user.php"> <p> </p> <?php while($row = mysql_fetch_array($result)) { ?> <table width="545" border="0" … | |
HI members,i'm newer here ,i prepare research about secure data exchanging between client side(JavaScript) and server side(PHP) of the web by implementing RSA Encryption system . I found RSA implementation by JS , i search about server side (php) but i find not useful php scripts ... So ...I need … | |
Re: Hiii, I agree with Smantscheff... check this code [CODE]SELECT * FROM test WHERE name = 'Meals' OR parent = (SELECT id FROM test WHERE name = 'Meals') order by id asc;[/CODE] %^^%Murtada%^^% | |
Re: Hiiii,check that code: [CODE] function get_parents ($pid, $found = array()) { array_push ($found, $pid); $sql = "SELECT * FROM products WHERE child_id = '$pid'"; $result = mysql_query($sql) or die ($sql); if(mysql_num_rows($result)>0){ while($row = mysql_fetch_array($result)){ $found[] = get_parents($row['pid'], $found); } } return $found; } [/CODE] %^^%Murtada%^^% | |
Re: Hii,Jack ,check this code : [CODE] echo "<tr><td><b>click</b></td><td><a href=test.php?id=".$id."&code=".$pcode."&name=".$pname."§ion=".$psection." target=\"_blank\">Click</a></td></tr>"; [/CODE] and recive this vaiables in test.php by default array $_GET['']: [CODE] <?php $pid=$_GET['id']; // values getting $pcode=$__GET['code']; //values getting $pname=$_GET['name']; // values not getting $psection=$_GET['section']; // values not getting echo "$pid \n"; echo "$pcode \n"; echo "$pname \n"; echo … | |
Re: Hiii , I solved it by using array ....check it: [CODE] <html><head><title></title><script language="javascript">fields = 0;function addInput() {if (fields != 10) {document.getElementById('text').innerHTML += "<input type='text' value='' name='field[]' /><br />";fields += 1;} else {document.getElementById('text').innerHTML += "<br />Only 10 upload fields allowed.";document.form.add.disabled=true;}}</script></head><body><form name="form" action="form.php" method="post"><input type="button" onclick="addInput()" name="add" value="Add input field" /> <div … | |
Re: Hii,may be the username field is unique and you entered duplicate name in the same field... question: where the primary key of dbusers table you made? %^^%Murtada%^^% | |
Re: use $_POST['ch1'],$_POST['ch2'] instead of $ch1,$ch2 if the method of form is post.., and check this [CODE] $where=""; if ($_POST['ch1']== 'movies') { $where = " and A.OB_MOVIES= 'true' "; } if ($_POST['ch2']== 'music') { $where = " and A.OB_MUSIC= 'true' "; //instead of [B][U]0[/U][/B]B_MUSIC its zero not O } [/CODE] %^^%Murtada%^^% | |
Re: hii,First you used post method in form ,in proccesaddcontact.php use $_POST instead of $_GET, Second for inserting all file data into DB is not best way , the best way i know : 1-made folder and name it ,for example(photo) in the site folder. 2-save the file names(path) in DB. … | |
Re: Hiii, i found something near WHERE id= ... ,use [U][B]t1.id[/B][/U] unsteaf of [B][U]id[/U][/B] and the operator [B][U]in[/U][/B] : [CODE] delimiter | create trigger comment_count AFTER INSERT on comments FOR EACH ROW BEGIN UPDATE sub_sections as t1 SET t1.published_comment_count = (select count(id) as cnt from comments where article_id=t1.id and published=0 and … | |
Re: Anthony ...thanks alot...It helped...I wish to you higher progress... |
The End.