Hey, I'm having a problem executing the following code: [CODE] <?php session_start(); require('connect.php'); if($_POST['username'])){ $name=$_POST['username']; $checkUsername = mysql_query("select * from users where UserName='$name'"); if(mysql_num_rows($checkUsername){ echo 'Logged in successfully!'; $_SESSION['username'] = $name; } else{ echo 'The username or password you've entered is not valid!'; } } ?> [/CODE]

Member Avatar
Member Avatar
+0 forum 4

Hello, I've been trying to solve this problem that has faced me many times on my website.. I have written a forum program. It works perfectly. However, sometimes a user tells me that he tried to post his comment, but his comment didn't appear on the page, and that he didn't see the message that tells him that his comment was successfully sent! This problem happened to me too. I tried to reload the page in order to re-post the data, but it was all in vain! I tried to edit my code and inserted after mysql_query("..") or die(mysql_error()); It …

Member Avatar
Member Avatar
+0 forum 19

Hello everybody I'm working on MySQL I always have to use the Count function like this: [CODE]$Q = mysql_query("Select count() from tableA",$connection);[/CODE] How can I handle this query? How can I handle the number returned by this query?? Thanks.

Member Avatar
Member Avatar
+0 forum 6

Hello.. I searched the forum for a thread that explains how to rename your username, but I couldn't find any.. How can I assign a new name to my membership here? Thank you.

Member Avatar
Member Avatar
+0 forum 4

Hello people.. I have written a code that replaces IMG tags in a text with the HTML <img tag.. However, I faced a problem; Big images spoiled the layout of the page being viewed. Is there anyway to limit the size of the image only when it's more than 300 wide and 400 high?? This is my code: [CODE] $Txt = $_POST['Text']; $arrA = array('[img]','[/img]'); $arrB = array('<img src="','">'); $Txt = stri_replace($arrA,$arrB,$Txt); echo $Txt; [/CODE] So I want to set the size limits as: 300,400.

Member Avatar
Member Avatar
+0 forum 6

Good evening or morning everyone.. Is there any way to understand this: $array = ('element 1','element 2','element 3'); while($x=each($array)){ echo $x['key'].' Value:'.$x['value']; } I mean where did the 'key' and 'value' come from although they're not defined in the file at all??

Member Avatar
Member Avatar
+0 forum 8

The End.