545 Posted Topics
Re: Can you tell us the exact error you are getting??? The error that you have is because you are using php script inside the html.... Zero13 has explained the way to write it in proper format.. | |
Re: To use session you must do like this... First of all your first line must be the starting of session and then declaring a variable and storing value in that session variable.... For eg:- [CODE] <?php session_start(); ?> <html> <head> <title>Session check </title> </head> <body> <?php $_SESSION["name"]=$_POST["username"];//to get the session … | |
Re: That what magicmedia told to get ip address of PC:- [CODE] $_SERVER['REMOTE_ADDR']; [/CODE] It will return the ip address of the user connected..... | |
Re: svilla is right..... If you are submitting form then you must use [B]($_POST['Submit']) [/B]. And also to check if it contains any value you must use the function [B]isset($_POST['Submit'])[/B] To get more idea about isset click [URL="http://php.net/manual/en/function.isset.php"]here[/URL] and for $_POST click [URL="http://www.tizag.com/phpT/postget.php"]here[/URL] | |
Re: There are different ways to do it... one of these are:- 1. Use a database and in that map it according to the value ,then convert it using some encrption like md5,sha1(Manual about[URL="http://php.net/manual/en/function.md5.php"] md5[/URL] and then retrieve it and use a variable "id" and store in it. Then write this.. … | |
Re: U can use this:- [CODE] $ip=$_SERVER['REMOTE_ADDR']; [/CODE] A better way to write this is using this:- [CODE] <html> <head> <title>What is my IP address?</title> </head> <body> <?php if (getenv(HTTP_X_FORWARDED_FOR)) { $pipaddress = getenv(HTTP_X_FORWARDED_FOR); $ipaddress = getenv(REMOTE_ADDR); echo "Your Proxy IPaddress is : ".$pipaddress. "(via $ipaddress)" ; } else { $ipaddress … | |
Re: You have to change it in php.ini file [B]upload_max_filesize = 20MB[/B] Check [URL="http://drupal.org/node/97193"]this[/URL] to understand how to configure php.ini file to upload file of size 20mb or so... | |
Re: First of all enclose your code inside CODE tag.... | |
Re: You can do this...Just [URL="http://www.uploadify.com/"]click[/URL] here to download the script.... More information for this is available in the following thread...Click [URL="http://www.daniweb.com/web-development/php/threads/355860"]here[/URL] | |
Re: Nothing wrong with that.....Also it is good to separate them.. | |
Re: You can use javascript validation to do that.Click [URL="http://www.w3schools.com/js/js_form_validation.asp"]here[/URL] to learn how to do javascript validation. Check this to do this using php:- 1.[URL="http://www.plus2net.com/php_tutorial/php_form_validation.php"] PHP2NET[/URL] | |
Re: I think so u r making infinite loop so it is causing our system to slow down.... After running the script just check the processes running ,their you will understand that which process is causing to slow down.... Also you can use firebug or chrome's inspect element to see the … | |
Re: Check[URL="http://dev-tips.com/featured/php-tip-add-custom-google-search-results-to-your-site-with-php"] this[/URL].....It might help you... | |
Re: Make a steganography project in which data is sent over wav file and also you can use effective way to decode it.... Or you can go for image processing in Matlab.... | |
Re: You can make a lot of projects like:- 1. Social networking site(like FB that too is made in PHP) 2. Auction site(security should be maintained properly....) and many more | |
Re: There are two ways....either use <form> or you can do it in the way proposed by rpn_sen [CODE] <a href="view.php?id=<?php echo $form_id;?>view</a> [/CODE] Or [CODE] <form method="POST" action="view.php"> <tr height="30px" style="color:#999999;" > <th><div style="text-transform:capitalize;"><? echo $form_id; ?></div></th> <th><div style="text-transform:capitalize;"><? echo $username; ?></div></th> <th><div style="text-transform:capitalize;"><? echo $form_name; ?></div></th> <th><div style="text-transform:capitalize;"><? echo … | |
Re: or you can also use javascript code in your application and sidewise use <noscript> tag... If script is not enabled then that tag will be implemented... | |
Re: yes javvy is right...<noscript> is used when the javascript is not enabled....It is used to give warning to useers regarding blockage of JS | |
Re: I prefer you to first check whether you are able to fetch data from database using mysql_fetch_array.... Because there is error in the query..... Check this....It might work... [CODE]$consulta = mysql_query("SELECT * FROM usuarios WHERE login = '".$login."'");[/CODE] If this works then it's ok... otherwise give the complete database and … | |
Re: @vibha-nice code....and that too with quite well explanation... | |
Re: Check the php.ini by writing the following code:- [CODE]<?php phpinfo(); ?>[/CODE] If the size is still 2Mb then u r not able to do it properly.... Better go to php.ini file and from there just change the upload_max_filesize to 20MB..... | |
Re: who told you this way to write query..... Look into this to learn how to write sql queries in PHP.....Click [URL="http://www.php.net/manual/en/function.mysql-fetch-array.php"]Here[/URL] | |
![]() | Re: you must have a primary key in the table to uniquely identify the user. Add a field in your table containing user data ,userid and mark it primary key.... urtrivedi has explained it nicely...how to use while rating .... |
Re: I would say php is much easy and light-weight than JSP as in JSP internally it converts the code to Servlet and it is too heavy code.... You can continue using [URL="http://www.w3schools.com/php/"]www.w3school.com[/URL] or you can also use [URL="http://www.php.net/manual/en/language.basic-syntax.php"]www.php.net[/URL] Both will give you the basics of php.... First of all just … | |
Re: Hello, You cannot use the header() function after you have already displayed some information to the page. You are displaying tons of info, and only after that are you using the header function(). If you want to use the header() function, you must do it before you display any output, … ![]() | |
Re: It's better to use echo instead of print....For info about it click [URL="http://www.nutt.net/2004/12/09/php-benchmarking-echo-vs-print-vs-printf/"]here[/URL] [CODE] <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head> <title>Your Output</title> </head> <body> <h1>Your Output</h1> <div style="text-align : center"> <?php $basicText = $_REQUEST["basicText"]; $borderSize = $_REQUEST["borderSize"]; $borderStyle = $_REQUEST["borderStyle"]; $sizeType = $_REQUEST["sizeType"]; $theStyle = "border-width:$borderSize$sizeType; border-style:$borderStyle; … | |
Re: The error is because of you mixed html and php and that too you have not handled it properly... The error is in this line.- [CODE] if (empty($CoName) == TRUE || empty($Address1) == TRUE || empty($City) == TRUE || empty($State) == TRUE || empty($Phone) == TRUE || empty($Email) == TRUE … | |
Re: the error is not in this line...better provide codes above and below...... | |
Re: you can directly make change in database or use this:- [CODE] mysql_query("Alter table table_name add constraint pk_key PRIMARY KEY (column_name)"); [/CODE] | |
Re: Use this query..... [CODE]SELECT B from table_name[/CODE] | |
Re: Hello, You cannot use the header() function after you have already displayed some information to the page. You are displaying tons of info, and only after that are you using the header function(). If you want to use the header() function, you must do it before you display any output, … | |
Re: please specify in which line there is an error accoding to your code....as line 43 is last line... ![]() | |
Re: @youvi-Can you tell what exactly you want??? We can link pages by including that page in another page.... [CODE] include("abc.php"); [/CODE] for more information click [URL="http://php.net/manual/en/function.include.php"]here[/URL] also you can use include_once().... Click here for information about [URL="http://php.net/manual/en/function.include-once.php"]it[/URL].... | |
Re: You have problem in updation or showing data from tables after updation using joins?? Instead of this:- [CODE] $insertSQL = "UPDATE orders SET STATUS = $choice"; [/CODE] Check this:- [CODE] $insertSQL = "UPDATE orders SET STATUS = '$choice'"; [/CODE] | |
Re: @jibmiel-we are here to help and fix the bugs ....not to write complete code.... Just show what is your code and where you want help....we will help you to do so..... | |
Re: Instead of "mysql_fetch_assoc" ...try using "mysql_fetch_array" It's better to use the code this way.... ..... Also [CODE] $query = "SELECT * FROM image_share WHERE to='$username'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { echo "<tr> <td width='100%' align='left' valign='top'> <div style='border-bottom:1px solid #6F6F6F;'><span style='color:#C0B184;'><a href=''><img src='".$row['image_sharelink']."' width='150' height='137'/></a></span><br/> <br/> </td> </tr>"; … | |
Re: yes..@blocblue is right..the header must be sent to browser before any content is outputted.... | |
Re: @Some-jackass:-you are right. the cause of error is because you are displaying something just before header. So to remove it either don't display before header or use [CODE]ob_start();[/CODE] at top and [CODE]ob_end_flush();[/CODE] at end | |
Re: Instead of searching for questions it's better you install linux in yur system and then try t implement various things....learn how to configure ntfs and other services in that...That will be useful.... | |
Re: [URL="http://linux.about.com/library/cmd/blcmdl1_at.htm"]http://linux.about.com/library/cmd/blcmdl1_at.htm[/URL] eg:- [CODE]at 1:35 at>echo "hi"[/CODE] after this press ctrl+d to end the line Then at that time you will receive a mail...t see that...type mail and print pid | |
Re: 1.If you are getting error like "Warning: Cannot modify header information - headers already sent by (output started at /path/file.php:1)" it means you've got some output before your header() call or starting a session. *No* output can be sent. that includes whitespace (outside of <?php and ?>) and any (X)HTML. … | |
Re: Do you know what you are doing??? The syntax for for loop is:- [QUOTE] for(initialization;condition check;increment/decrement) [/QUOTE] But in the first step you are using condition check,i.e. it will return either true or false.... | |
Re: Check this thread...a lot about this is discussed in this thread... [URL="http://www.daniweb.com/web-development/php/code/351142"]http://www.daniweb.com/web-development/php/code/351142[/URL] | |
Re: Or another alternative is to move the image as shown by Zero13 and then insert the filelocation into database... | |
Re: You can do that by using a primary key attribute and for every transaction generate the key and then use this query:- Let the primary key be-"Trans_id" Then:- [CODE] $query = "UPDATE transaction SET approved_status='1' WHERE account_number='$account_number' and Trans_id='$_POST['trans_id']"; mysql_query($query) or die(mysql_error()); [/CODE] Now only the respective transaction for a … | |
Re: You can use phpbb3.Even i also used the same forum and it worked fine and easy to administrate...You can also configure it according to your requirement and also make certain fields mandatory and other stuffs in this.... Quite easy and good one.. | |
Re: see for this first of all you need a textfield and then on submit action find the key from database... let the textfield name be serach,table name be item_details [CODE] select item from item_details where item like '$_POST['search'] [/CODE] and then on clicking the item for purchase redirect the server … | |
Re: For that you don't require php....Just make a textfield and take input from it.... [CODE] Enter your name<input type="text" name="name"> [/CODE] | |
Re: You can work on several php editors like wamp server,xampp server,.... No need to buy domain until you need it for some specific purpose...For learning it's not required.... ![]() |
The End.