1,730 Posted Topics

Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for billmudry
Member Avatar for gilgil2

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

Member Avatar for Stefano Mtangoo
0
222
Member Avatar for Aviplo

that is the work of HTML/CSS. PHP does not know anything about markup and is processed on server!

Member Avatar for Aviplo
0
3K
Member Avatar for Stefano Mtangoo

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!!"); }

Member Avatar for qazplm114477
0
200
Member Avatar for srdva59

[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!

Member Avatar for hakeemtunde
0
192
Member Avatar for extjac
Member Avatar for Stefano Mtangoo
0
187
Member Avatar for gilgil2

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]

Member Avatar for Stefano Mtangoo
0
193
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
332
Member Avatar for PF2G

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.

Member Avatar for phorce
0
326
Member Avatar for swissknife007

[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 …

Member Avatar for diafol
0
345
Member Avatar for cip6791

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!

Member Avatar for Stefano Mtangoo
0
150
Member Avatar for aaloo

not sure if it will help [url]http://stackoverflow.com/search?q=related+articles[/url]

Member Avatar for diafol
0
3K
Member Avatar for harsha.netpem

[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!

Member Avatar for Fest3er
0
749
Member Avatar for eltonpiko
Member Avatar for blaaam

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!

Member Avatar for Stefano Mtangoo
0
171
Member Avatar for suhnako

[URL="http://www.w3schools.com/php/php_mysql_intro.asp"]What is wrong with your code[/URL]

Member Avatar for diafol
0
310
Member Avatar for dave086

[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!

Member Avatar for diafol
0
209
Member Avatar for Psyho

[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*

Member Avatar for Stefano Mtangoo
0
119
Member Avatar for furlanut

[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 …

Member Avatar for moneeshot
0
149
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
215
Member Avatar for johnnc

[URL="http://www.phpro.org/tutorials/Introduction-To-SimpleXML-With-PHP.html"]Best tutorial[/URL] on simplexml

Member Avatar for jmichae3
0
455
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for pritaeas
0
502
Member Avatar for Stefano Mtangoo

Is it possible to export MySQL database to SQLite? If possible, how do you do that?

Member Avatar for Stefano Mtangoo
0
76
Member Avatar for davy_yg
Member Avatar for davy_yg
0
173
Member Avatar for davy_yg

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 …

Member Avatar for Zahinize
0
184
Member Avatar for rohit.k2903
Member Avatar for davy_yg

can you add before insert query the code below and post output? [CODE=PHP]print_r($_GET); die();[/CODE]

Member Avatar for davy_yg
0
252
Member Avatar for Dante2

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

Member Avatar for Dante2
0
137
Member Avatar for vizz

make forms variables and ech time link is clicked echo the necessary variable!

Member Avatar for broj1
0
99
Member Avatar for ayub05

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]

Member Avatar for ayub05
0
2K
Member Avatar for london-G

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 …

Member Avatar for Stefano Mtangoo
0
118
Member Avatar for lovelylaya

[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 …

Member Avatar for Stefano Mtangoo
0
158
Member Avatar for azdonald

[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 …

Member Avatar for mschroeder
0
127
Member Avatar for Szabi Zsoldos
Member Avatar for moshe12007

[COLOR="Green"]DeleteUser($_POST['EmailDel'])[/COLOR];?? What on earth is this beast?

Member Avatar for vimalnath53
0
87
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
194
Member Avatar for davy_yg

couldyou add [B]print_r($_POST); die();[/B] and comment out $gambar = $_POST['gambar'];

Member Avatar for Stefano Mtangoo
0
309
Member Avatar for simplyhuman

[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]

Member Avatar for Stefano Mtangoo
0
101
Member Avatar for castillolk
Member Avatar for castillolk
0
181
Member Avatar for Treasurepet

[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 …

Member Avatar for Stefano Mtangoo
0
392
Member Avatar for Webxpres

[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 …

Member Avatar for Stefano Mtangoo
0
214
Member Avatar for DoubleZ
Member Avatar for sreejithbabu
0
211
Member Avatar for geekme
Member Avatar for mehdi.yazdani

have a look at [URL="net.tutsplus.com/tutorials/php/how-to-paginate-data-with-php/"]this tutorial[/URL]

Member Avatar for Stefano Mtangoo
0
125
Member Avatar for zeeya

[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

Member Avatar for Stefano Mtangoo
0
927
Member Avatar for Galbatorix

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]

Member Avatar for Stefano Mtangoo
0
100
Member Avatar for dinhunzvi

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

Member Avatar for Stefano Mtangoo
0
252
Member Avatar for Mayank23

[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 - …

Member Avatar for Stefano Mtangoo
0
578
Member Avatar for Nahiyan

may be screenshot will help explaining what you are saying. I have not understood what you have just said!

Member Avatar for Zagga
-2
476

The End.