- Upvotes Received
- 13
- Posts with Upvotes
- 11
- Upvoting Members
- 5
- Downvotes Received
- 7
- Posts with Downvotes
- 7
- Downvoting Members
- 4
21 Posted Topics
Re: u can use split.... like... [CODE]<?php $str="10,15,5"; $parts = split('[,]', $str); print "First Is : $parts[0]<br>Second Is : $parts[1]<br>Third Is : $parts[2]<br><br>"; $total=$parts[0]+$parts[1]+$parts[2]; print "Total is : $total"; ?> [/CODE] Try this! this is what you actually want! it's good..... | |
Re: [QUOTE]following code will return age in days for each user Help with Code Tags PHP Syntax (Toggle Plain Text) SELECT username,datediff( current_date( ) , birthdate ) FROM datatable[/QUOTE] I thinks you are right! | |
Re: almostbob, I think we must try to use && instead of and, anyways, i think we can also use this code... [CODE]<?php $adminuser = $_POST['adminuser']; $adminpass=$_POST['adminpass']; if(($adminuser || $adminpass)==NULL){ echo "Please enter Username and Password";} else if(($adminuser=="admin") && ($adminpass=="manoj")){echo "Good!";} else{echo "Invalid Username and Password";} ?>[/CODE] | |
Re: "Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive." is a perfectly correct sentence... | |
Re: what are you doing at line no. 29...? I think you are giving the value to $row by ($row = mysql_fetch_array($sql)). Well i have not read your program fully, so i can't understand your logic. But you but, use a condition when using while or for loop. by your condition … | |
Re: anyways i am using this code as login page... test1.htm [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <form name="form" action="test1.php" method="post" onSubmit="return verify()"> <table width="200" border="0"> <tr> <td>Enter Your ID … | |
Re: I am using test1.htm as form... the code is as follows... [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <form name="form" action="test1.php" method="post" onSubmit="return verify()"> <table width="200" border="0"> <tr> <td>Flavours : … | |
Re: anyways I am using this code, and it's working good on my machine... form.htm [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <form name="form" action="test1.php" method="post" onSubmit="return verify()"> <table width="200" border="0"> … | |
Re: I think PHP and Apache is enough for that.... | |
sorry but i am new to my sql, I have just a basic question.. and that is how can i create a database or table on the server! I have learned that we can create database or table by using my sql command line... but the main problem is our … | |
Re: 4- On completion of the form, instead of the message "Okey! We Are Proceed. Thank You !" I want the browser to redirect to [url]http://www.n-v-m.co.uk/Thankyou.html[/url] Ans. [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META … | |
Re: if i am not wrong, then & sign in useful when we want to call a class. i have also seen this type of functions in so many program. And in every program there was a similar thing and that was - they are calling a class when calling function.... … | |
Re: use this type of code structure... [CODE]<?php $Name = "Da Duder"; //senders name $email = "email@adress.com"; //senders e-mail adress $recipient = "PersonWhoGetsIt@emailadress.com"; //recipient $mail_body = "The text for the mail..."; //mail body $subject = "Subject for reviever"; //subject $header = "From: ". $Name . " <" . $email . ">\r\n"; … | |
Re: just use "POST" instead of "post". post must be in capitals... and yeah one more mistake you have done in this code is, you have set action="", it means that form will not save that value. just use this type of code.... ummmm... let me change line 33 of your … | |
Re: I think you are getting this error because of that login page. Actually I have faced that with one of my client's website. So please try to do it as BzzBee told. I mean try to make your login page in HTML form. It will work absolutely good.... | |
Re: what actually you want! please clarify briefly so that i can understand... | |
Re: Use This Code.... [CODE]<?php $total=0; for($a=1;$a<=10;$a++) $total=$total+$a; echo "Total of 1 to 10 is : $total"; ?>[/CODE] | |
Re: PHP is everything.... I mean you can do anything with PHP... But I can't understand your question. Please Clarify that what actually you want to do... | |
Re: Will Gresham, You are right! he/she must give answer.... Why you are not using the previous thread... Me and Atli are fighting at there for a good code..... and you made a new thread ? It's not fare... Just come to old thread you have created, to get the answer … |