1,730 Posted Topics
Hi friends, I need to make a simple parser for parsing PHP files (classes, functions et al) and I have read both Flex and Bison manual. I have read somewhere that I must build Abstract Syntax Tree (AST) and utilize that. But I cannot find any tutorial on how to … | |
Re: Mh! What is exactly your question? | |
Re: first if this line of code fails there is no notice like you did to connect [CODE=PHP]mysql_select_db('database'); [/CODE] may I know why you are mixing ampersand abd AND [CODE=PHP]if(isset($_POST['username']) && !empty($_POST['username']) AND isset($_POST['password']) && !empty($_POST['password'])) Also print_r($_POST) to see if the form posts values and indices are correct | |
Re: that is the work of HTML/CSS. PHP does not know anything about markup and is processed on server! | |
Hi Buddies, here is my happy new year greetings to all PHP friends. Love you and enjoy DW! $greetings = "Have nice year full of projects and less stress <br /> Enjoy!"; if(!$is_dead && $is_visiting_dw){ echo $greetings; }else{ die("Dead people do not browse internet!!"); } | |
Re: [QUOTE=srdva59;1728754]hi, the app is growing and everyday i must add new fields.[/QUOTE] App growing or bad design? App growing should at worst add new table not alter a table. I think it is time to check your design! | |
Re: Last one is the best plus, use parametric queries (Bind/execute) | |
Re: want to coin yours? [URL="http://www.youtube.com/playlist?list=PL7C9AFC3942AC8E40&feature=plcp"]start here[/URL] Ready made? [URL="http://www.evolt.org/node/60265"]Here we go![/URL] | |
I want to write a wrapper around MySQL but I will in future extend it to support other databases. I will cover only nasic useful features (commons) but it should be extensible in future with minimal change. I want to write an interface but I cannot get good tutorial to … | |
Re: to log out just unset variables you did set and destroy the session. I can see validation in JS, that is bad unless it there is of course another check in Server side. | |
Re: [QUOTE=swissknife007;1717589] I would like to know whether how I can send the email to multiple recipients.... Also I am just a green horn in PHP ,I really don't what know kind of features are possible. So I would appreciate your guidance on the same.And also the implementation part. Thanks life,universe … ![]() | |
Re: Use AJAX Calls from one domain to another. If they share database then just check isOnline field which you must set in that other domain! | |
Re: not sure if it will help [url]http://stackoverflow.com/search?q=related+articles[/url] ![]() | |
Re: [CODE=PHP]db_connect(); $qry="select * from company $where"; $result=mysql_query($qry); if (!$result) { die('Invalid query: ' . mysql_error()); } $row=mysql_fetch_array($result);[/CODE] post the error message here! | |
Re: explain more with what you have so far! ![]() | |
Re: Coding yours is perfect solution. Otherwise you have to live with waht is available. If you want to code one, checking PHP framework will be of great help! | |
Re: [URL="http://www.w3schools.com/php/php_mysql_intro.asp"]What is wrong with your code[/URL] ![]() | |
Re: [QUOTE=dave086;1708509] Simple xml is not something I've come across before...[/QUOTE] [url]http://www.phpro.org/tutorials/Introduction-To-SimpleXML-With-PHP.html[/url] Another dirty option will be scrapping all html page from link and display them as they are! ![]() | |
Re: [CODE=php]if(!isset$_SESSION['expiry']){ $_SESSION['expiry']=time()+$time_to_expire; }else{ //if time have expired if( time()>$_SESSION['expiry']){ //echo message and redirect to the page //unset variable } }[/CODE] *untested* | |
Re: [QUOTE=ardav;1686018]html pages can't display php unless you stipulate this in .htaccess. Change .html to .php and it should work (if your code is OK).[/QUOTE] I just tested code blow and it didn't work! [CODE]<html> <head> </head> <body> <?php echo "It works!"; ?> </body> <html>[/CODE] adding this line in htaccess file … | |
Hi, I need to concatanate lines based on regex. Lines to be concatanated are scattered. All lines begin with number$number$number$number$sentences. There is nothing to mark the end of sentence, only the beginning. Here is an example. I want to rewrite this one [CODE]2 $5$233$ check big cat if it have … | |
Re: [URL="http://www.phpro.org/tutorials/Introduction-To-SimpleXML-With-PHP.html"]Best tutorial[/URL] on simplexml ![]() | |
Hi, I need to write very simple RTF parser to write and read basic rtf (bold,italic, underline, paragraph et al). I have searched for techniques I can implement but havent found good example. I would like to hear from you guys what approach whatsoever you consider to be best for … | |
Is it possible to export MySQL database to SQLite? If possible, how do you do that? | |
| |
Re: there are couple of security issues to deal with 1. Prevent unauthorized logins. Here you will meet th greatest threat, SQL injection. Once you deal with that thru data validation, whitelisting and preparedstatements you are ready for next challenge. 2. You need to prevent your authentication data mostly session from … | |
![]() | |
Re: can you add before insert query the code below and post output? [CODE=PHP]print_r($_GET); die();[/CODE] | |
Re: Did you install wampserver or xampp? Did you start it well? do [url]http://localhost[/url] work? Bing redirects you to search once it fails to locate url. it seems your apache server have issues. Try restarting services or backup your data and reinstall the whole thing | |
Re: make forms variables and ech time link is clicked echo the necessary variable! | |
Re: Change the relevant code to below and post error message here [CODE=PHP]$sql = "SELECT * FROM `dig_users` WHERE useremail='$em'"; $result = mysql_query($sql); if(!$result) die(mysql_error());[/CODE] | |
Re: suppose you have field in database called email and php form field named email then [CODE=PHP]$email = mysql_real_escape_string($_POST['email']); $sql = "SELECT * FROM users_table WHERE email='$email'"; $res = mysql_query($sql) if($res){ if(mysql_num_rows($res)>0){ //email found else{ //email not found } }else{ // nothing came from db perhaps errors or such } //code … | |
Re: [QUOTE=lovelylaya;1695649]Hi I recently installed XAMPP and tried my first test page by creating a sub-folder in htdocs namely password_test which containts 2 files: password.txt and an index.php. While trying to execute i get the following: file:///C:/xampp/htdocs/password_test/ -------------- Index of C:\xampp\htdocs\password_test\ Name Size Date Modified [parent directory] index.php.txt 129 B 11/18/11 … | |
Re: [QUOTE=mschroeder;1694056]First, your class is mixing to many responsibilities. You should be passing an already established database into your quiz class if it is needed. Second, Your class should not be responsible for rendering the form as well, this is another responsibility that is mixed. Third, you could probably benefit from … | |
Re: Pls read my signature, I don't want to yell at you :) | |
Re: [COLOR="Green"]DeleteUser($_POST['EmailDel'])[/COLOR];?? What on earth is this beast? | |
Hi, I want to parse PHP entities (classes, variables functions methods and properties) and save information on database (function signature, variable name et al). I'm trying to see alternatives for how I can archieve that with any language (the technique). So far I'm thinking of using regex to match stuffs … | |
Re: couldyou add [B]print_r($_POST); die();[/B] and comment out $gambar = $_POST['gambar']; | |
Re: [QUOTE=simplyhuman;1693866]How can I export the data which is in excel format? [/QUOTE] As Rich said use CSV. Excel can well import it [QUOTE=simplyhuman;1693866]Can images or Videos be embedded in PHP?[/QUOTE] Yes why not! Aren't they just html done with echo? [CODE=PHP]$img= "<img alt='blah blah' src='image.png' />"; echo $img; [/CODE] | |
Re: May be pops are blocked in your mozilla check your settings plus this is JS question! | |
Re: [QUOTE=Treasurepet;1692428] Warning: Cannot modify header information - headers already sent by (output started at /home/leomconn/public_html/index.php:9) in /home/leomconn/public_html/index.php on line 190 Please I need somebody to help[/QUOTE] As ardav said you cannot do that but there is a workaround. Use [URL="http://php.net/manual/en/function.ob-start.php"]ob_start[/URL]. If you want to know why, someone did took a … | |
Re: [QUOTE=Webxpres;1693590]@Tyskby...you have being a great deal of help to me and I appreciate this. I will try and make the necessary corrections to see what I will be getting inside the email address I specified inside the script. God bless you bloke!!![/QUOTE] next time you put only relevant part of … | |
Re: I'm not sure I got your question. How do you know right element to remove (bad ones)? | |
Re: have a look at [URL="net.tutsplus.com/tutorials/php/how-to-paginate-data-with-php/"]this tutorial[/URL] | |
Re: [QUOTE=zeeya;1692434]Hello!! What i need to know to build this system? [/QUOTE] You need to know: 1. What DSS is and how it works 2. HTML/CSS for styling and markup 3. PHP/Javascript for making things happen 4. SQL for storage 5. Optional but adds whistles and bell that is AJAX | |
Re: Check directory iterator class. Here is sample code [CODE]<?php $dirIterator = new DirectoryIterator(dirname(__FILE__)); foreach ($dirIterator as $fileInfo) { if($fileInfo->isDot() || !$fileInfo->isFile()) { continue; } echo "<p>".$fileInfo->getFilename() . "</p>"; } [/CODE] | |
Re: change directory to source code folder cd /home/dinhunzvi/Downloads/theFolder ./configure && make && sudo make install It depends on what you are installing. If it needs headers/libraries and the language it is coded in | |
Re: [QUOTE=ardav;1691010]Are you serious? How do you expect to do this? I could vote in your poll, then change machines and vote again. You need to have a login to vote. IP addresses are clumsy and don't work anyway. I've seen, place your email account here boxes, but that's pointless - … | |
Re: may be screenshot will help explaining what you are saying. I have not understood what you have just said! ![]() |
The End.