1,741 Posted Topics

Member Avatar for lordx78

just echo it. die is an alias of exit and once exit/die is encountered, the execution of the script stops there itself. You can print the error in this fashion ! [code=php] <?php if(isset($_POST['submit'])){ if(empty($_POST['name'])){ $error="Name field is empty !"; } else { //process the information } } ?> <html> …

Member Avatar for nav33n
0
88
Member Avatar for carobee

Say if the output is of 2 pages. Then how can you output everything in 1 page ? You can specify the width and height of the page, but if the output is more, I dont think you can avoid scroll.

Member Avatar for Suetan
0
151
Member Avatar for abhi287

[quote]I actually wasn't even aware PHP could use that format for while loops[/quote] Yeah.. I wasn't aware too.. :)

Member Avatar for somedude3488
0
118
Member Avatar for lordx78

in validated.php page, print out the session variables. [icode]print_r($_SESSION); [/icode]

Member Avatar for lordx78
0
515
Member Avatar for mom_of_3

Its expensive, but the features are good. Some features are Syntax highlighting,easy debugging, automatic end tag insertion, analysing the code, etc.

Member Avatar for nav33n
0
44
Member Avatar for JeniF

What is this [icode]$expected = array('menuassignment'); [/icode] for ? Where are you using it ? What is the array you are trying to validate ? Could you explain your problem in detail ?

Member Avatar for nav33n
0
215
Member Avatar for ultratut

Instead of [quote]$f = fopen($main_url,"r"); $inputStream = fread($f,65535); fclose($f); [/quote] use, [icode]$inputStream = implode("",file($main_url)); [/icode] The problem with your code was, it was reading only a part of the file.

Member Avatar for nav33n
0
272
Member Avatar for joker40

[QUOTE=joker40;546473]hey man untill now i am using the localhost , so i want to know if its possible to send an email from the localhost server (which is Apache server).[/QUOTE] You need to configure your apache to send mail. You need a valid smtp server to send a mail. You …

Member Avatar for joker40
0
118
Member Avatar for Auzzie

umm.. Are you using php 5+ on apache 2.0+ ? By default, mysql service is disabled in php5. You need to add 2 lines in httpd.conf file in apache/conf. [icode]LoadModule php5_module php5apache2.dll AddType application/x-httpd-php .php [/icode] Open php.ini and uncomment mysql extension. Check the extension_dir folder in php.ini. Specify the …

Member Avatar for Auzzie
0
97
Member Avatar for cherylt
Member Avatar for amanda2008
Member Avatar for shakti_c
Member Avatar for pete21
Member Avatar for tlkolrod
Member Avatar for conklin
Member Avatar for veer_bala82
Member Avatar for maydhyam
Member Avatar for lordx78
Member Avatar for lordx78

Or, you have to make php parse the files with html extensions. Add [icode]AddType application/x-httpd-php .html[/icode] to your httpd.conf file of apache. It will parse html files as php. Cheers, Naveen

Member Avatar for nav33n
0
164
Member Avatar for lordx78

Basically, SHA1, md5, password, encrypt, etc are the encrypting functions. If you encrypt a password field, your application will be more secure. That's all.

Member Avatar for lordx78
0
111
Member Avatar for jtapp

Sorting non-alphabetical/non-numerical records is not possible AFAIK. But you can have one more field of type int in the table, eg, type. You can enter the order of title, then sort by type !

Member Avatar for nav33n
0
74
Member Avatar for jinchiruki

Try this. [code=php] <table width="1000" height="95" border="1"> <tr> <td bgcolor="#0000FF">&nbsp;</td> </tr> </table> <?php include("connect.php"); //this is your validation in the form,put it here.... if (empty($_POST['name'])) { $errors[] = 'Please enter a name'; } if (empty($_POST['email'])) { $errors[] = 'Please enter a valid e-mail address'; } else if (!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$", $_POST['email'])) { …

Member Avatar for nav33n
0
100
Member Avatar for gooky9

to loop ? Which loop ? Put the whole thing in whatever loop you want. [code=php] <?php for($i=0;$i<10;$i++){ if ($daybooked == 1){ print sprintf('<td align="center" bgcolor="%s">&nbsp;%d&nbsp;</td>',$opts['today_color'],$day); } else{ print sprintf('<td align="center"><font color="#999999">&nbsp;%d&nbsp;</font></td>',$day); } } //this will loop 10 times. .... ?> [/code] If thats not what you looking for, then …

Member Avatar for nav33n
0
126
Member Avatar for asadalim1

[code=php] <?php if(isset($_POST['team'])) { foreach($_POST['team'] as $value){ $insert=mysql_query("INSERT INTO team('team') VALUES ('$value')"); } } ?> <html> <body> <form method="post" action="chk123.php"> <input type="checkbox" name="team[]" value="AG"> Argentina <br /> <input type="checkbox" name="team[]" value="GE"> Germany <br /> <input type="checkbox" name="team[]" value="BR"> Brazil <br /> <input type="submit" name="submit" value="submit"> </form> </body> </html> [/code] There! …

Member Avatar for asadalim1
0
11K
Member Avatar for gopi kannan

[quote]If memory serves me, that would not be a correct variable for mysql_num_rows.[/quote] Nope. [icode]$result=mysql_query($query) or die(mysql_error()); [/icode] will assign the resultset to $result if the query executes without any error. If it encounters any error, the script print the die statement and exit. When you call the function, instead …

Member Avatar for gopi kannan
0
80
Member Avatar for BillyMako

[code=php] $query="select * from table where date_column between date1 and date2"; [/code]

Member Avatar for nav33n
0
91
Member Avatar for Vai

Instead of sending him his username and password, why not send him a link pass_update.php followed by a string of encrypted key. For example, pass_update.php?secure=hash(email).hash(prev_password_field) When the user clicks on the link, check if hash of email and hash of previous_password is valid. If yes, then let him change his …

Member Avatar for nav33n
0
119
Member Avatar for jtapp

As far as I can see, both are coming from the same query. [quote]SELECT a.strLodgeName, a.intLodgeNumber, a.strDistrictName, a.strLodgeWEB, a.strLodgeCounty, a.dtChartered, a.strLodgeMailingAddress, a.strLodgeMailingAddress2, a.strLodgeMailingCity, a.strLodgeMailingStateCode, a.strLodgeMailingPostCode, a.strLodgeEmail, a.strLodgePhone, a.strLodgeFax, a.strDrivingDirectons, a.dtMeetingTime, a.dtMealTime, a.strFloorSchool, a.strLodgeNews, b.strOfficerTitle, b.strFirstName, b.strLastName, b.BusinessPhone, b.PersEmail FROM tblLodges a LEFT JOIN tblOfficers b ON a.lngLodgeID = b.lngLodgeID WHERE …

Member Avatar for nav33n
0
126
Member Avatar for shedii

[quote]But I wasn't sure if anyone can learn php without programming knowledge because a friend of mine said one needs programming knowledge to proceed to php learning. Thanks for clearing my doubt.[/quote] Well, You should know the basics of any programming language, like, loops, conditions, etc. But php is VERY …

Member Avatar for richie513
0
134
Member Avatar for MaryBRA
Member Avatar for zandiago

Since 'naveen' was already taken and nav33n wasn't, I decided to 'take' it ! Btw, Naveen is my name.

Member Avatar for jbennet
0
364
Member Avatar for Rockpebblar
Member Avatar for jeffige

Welcome to Daniweb Jeff! Thats an interesting intro ! Umm.. Installing Borland C ? Read the first readme of [url=http://www.daniweb.com/forums/forum118.html] this [/url] forum. Cheers, Naveen

Member Avatar for jeffige
0
139
Member Avatar for Moporho
Member Avatar for Logo
Member Avatar for hawashafiq
Member Avatar for farrhad
Member Avatar for Aikell
Member Avatar for LSV2008
Member Avatar for Jerry4ssi
Member Avatar for wit tier
Member Avatar for bihartourism
Member Avatar for scorpionz
Member Avatar for djcolej

uhmm..welcome to Daniweb djcolej.. But you have to post your question in respective forum !

Member Avatar for John A
0
46
Member Avatar for gopi kannan

Very simple. While redirecting, redirect with a value in the query string. And if that variable is set, display the error message. eg. [code=php] <?php //incorrect login header("location: login.php?err=1"); ?> [/code] And in login.php, [code=php] <?php if(isset($_GET['err'])){ $errormsg="Incorrect login.."; } //display $errormsg whereever you want, to indicate an invalid login. …

Member Avatar for nav33n
0
76
Member Avatar for jino

[QUOTE=richie513;543247]Try taking the single quotes away from the zero in this line: if($english_level!='0') change to if($english_level!= 0) :)[/QUOTE] No. That ain't the reason for this error. !='0' works just the same like !=0, as in the following example. [code=php]<?php $english_level=0; if($english_level=='0'){ $query_array[]= "reg_english_level.english_level1 = '". $english_level . "' OR reg_english_level.english_level2 …

Member Avatar for nav33n
0
105
Member Avatar for divya_258

pog generator ? umm.. Never heard that before.. What do you mean by save method ? Save what ? Could you post your code please ?

Member Avatar for divya_258
0
173
Member Avatar for whoisit

Hi ! missing semicolon in these lines. [code=php] $msg=$user << here header ("Location:vote_page.php?$msg=$msg"); break; case "Jim": $msg=$user << here [/code] Cheers, Naveen Edit: Btw, this [icode]header ("Location:vote_page.php?$msg=$msg")[/icode] should be [icode]header ("Location:vote_page.php?msg=$msg")[/icode], if you want to use $msg value in vote_page.php !

Member Avatar for nav33n
0
139
Member Avatar for djouija

url has slashes which should be stripped or escaped. Check [url=http://in2.php.net/addslashes]addslashes [/url].

Member Avatar for squid44th
0
145
Member Avatar for nav33n

Hi, Dani! Are you changing the layout again ? In [url=http://www.daniweb.com/forums/thread109955.html] this [/url] particular thread, the border is acting weirdly and the menu on the right isn't visible(in IE) ! Here are the screenshots of IE and FF. Cheers, Naveen

Member Avatar for jasimp
0
143

The End.