743 Posted Topics

Member Avatar for Aamit

These are the PHP session files in serialized (encoded) form. Note that is it not encrypted, it is just encoded. The strings represent objects in PHP, and PHP knows how to turn it back into actual Objects. The value of this file is available for the specific user through the …

Member Avatar for Aamit
0
232
Member Avatar for alaa_steel

[QUOTE=foxwizzy;1035447]Can i use one of this to update my password in the mysql db?[/QUOTE] Please post your question in a new thread instead of resurrection a thread that is years old. Here is the documentation to the syntax of a mysql update query: [url]http://dev.mysql.com/doc/refman/5.0/en/update.html[/url] Here is the documentation for mysql_query: …

Member Avatar for zimah
0
199
Member Avatar for Ghost

Is there an error you're getting? I don't see any particular problem in the code. Normally, you'd want to have a database do this job for you. It is much simpler than having to read/write from files. For example, with a DB it is as simple as: [CODE]$result = $Db->Query("DELETE …

Member Avatar for mschroeder
0
5K
Member Avatar for mahe4us

Hi mahe4us, When you pipe to the php script, you must make sure that the php script does not send any output. It looks like your php script is has the output: [B]PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version …

Member Avatar for kerryJames
0
337
Member Avatar for Dheeraj Kumar

[QUOTE] <?php if(!$sql){ echo 'There has been an Error for Submitting your request. Please Contact the Web Master.'; }else{ echo "Hello <u><b>".$name."</b></u>"; echo '<br/><hr>Thank you'; echo '<br/><br/>Your Request is under process. Our Representative will get in touch with you.'; sleep(5); echo '<script><!-- window.location= "http://www.widecomindia.com/home.html" //--></script>'; // header("Location: http://www.widecomindia.com/home.html"); }[/QUOTE] You …

Member Avatar for jogesh_p
0
285
Member Avatar for phpuser

[QUOTE=phpuser;637432]I made one php project in which we provide facility to create his/her own web site. Now I wants to add new feature giving different subdomains to the members' web pages. Because the number of members is about 120,000, manual configuring is not the solution. Let me give you an …

Member Avatar for phpuser
0
134
Member Avatar for qazplm114477

Just a note. A disadvantage of using .inc is that it will be visible to visitors if accessed directly. Using .php will hide the source code since the server will always parse the PHP before serving.

Member Avatar for digital-ether
0
110
Member Avatar for festprabu
Member Avatar for digital-ether
0
127
Member Avatar for jrock2004

Yes, that could be the issue. When passing strings from PHP to the shell, make sure to escape them with escapeshellarg(). see: [url]http://php.net/manual/en/function.escapeshellarg.php[/url] btw, the reason the $ is causing a problem is because the shell sees it as the token that begins a variable. When using escapeshellarg() the meta …

Member Avatar for digital-ether
0
139
Member Avatar for iketunde

[QUOTE=iketunde;172141]I have a php page with two hyperlinks. I one to send email to certain addresses and the other to also send emails to another address and also delete their records from the database. I don't want a case where the user accidentally clicks on the link takes the wrong …

Member Avatar for mohammed yaghi
0
2K
Member Avatar for steven01

[QUOTE=steven01]sorry,I don't familiar with it.Can you give me some codes or how to do in dreamweaver?[/QUOTE] HI steven01 RSS is a way of syndicating site content. The RSS file is an xml file with the RSS specification. That means its written to follow rules layed out for all RSS files. …

Member Avatar for joshisumitnet
0
475
Member Avatar for Lightninghawk
Member Avatar for mplok
0
216
Member Avatar for digital-ether

A very simple MySQL database class. [B]Usage:[/B] [CODE]// connect $config = array( 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database); $DB = Database_MySQL::getInstance($config); // set query $DB->query("select * from table1 where col1 = %d and col2 = '%s' LIMIT 1", 5, 'a'); // get rows $rows …

Member Avatar for benjaminFowl87
0
238
Member Avatar for Chosen13

I would prefer PDO over Mysqli since it is not tied to a single database product (MySQL). With PDO, you can have the choice of database product to use, and thus if you wanted to change the databse product you use from MySQL to SQLite, it is simpler. ie: PDO …

Member Avatar for digital-ether
0
79
Member Avatar for ijazkhattak

Sessions by default PHP settings will store to files. As already mentioned, it is per user only. [B]If you don't have root access:[/B] You can however store the chat messages in memory only. Probably the simplest way to do this is to store your database table in memory. Mysql has …

Member Avatar for ijazkhattak
0
206
Member Avatar for wallance

Hi Wallace, What to note is that PHP includes files relative to the current file being executed. ie: [URL="http://en.wikipedia.org/wiki/Working_directory"]current working directory[/URL]. So the path does not depend on which file you are calling another file from, but from the file being executed by PHP (the first file PHP started executing). …

Member Avatar for digital-ether
0
120
Member Avatar for backendcode

The @ suppresses error messages. For different database extensions see: [url]http://www.php.net/manual/en/refs.database.php[/url] PDO is a really good abstraction of the database layer that you can build on: [url]http://www.php.net/manual/en/book.pdo.php[/url]

Member Avatar for ekseks
0
121
Member Avatar for khanrock

Are you sure you installed PHP correctly? It would be hard to find a distribution of PHP that does not have MySQL enabled by default. Try creating a PHP file with a simple call to mysql_connect() in it. See if you get the same problem. How did you install PHP …

Member Avatar for ekseks
0
71
Member Avatar for bamwamba

A simple way to read files in a directory is to use the glob() function. Example: [CODE] $files = glob('/path/to/directory/*'); [/CODE] You can use filemtime() to get the modification time of the file, so the latest file would be what you are after. You can use is_file() and is_dir() to …

Member Avatar for digital-ether
0
211
Member Avatar for Rkeast

[CODE]$creation_salt = sha1($username.':'.time());[/CODE] This salt is way to easy to guess. Considering time() is a number of seconds, there are only 60*60 in an hour, and 60*60*24 in an hour: [ICODE]86400[/ICODE] possible salts in one your.

Member Avatar for metalix
0
519
Member Avatar for jianwu_chen

[QUOTE=jianwu_chen;506812]thanks for the reply. But maybe you mis-understand my issue. Here my problem is not the javascript code itself. But the java script can't assess the data inside <![[CDATA .... ]][/QUOTE] Test it with XHTML and see if you get anything.

Member Avatar for julesmanson
0
1K
Member Avatar for Troy

If you're getting the error: Cannot modify header information - headers already sent by Add ob_start() to the beginning of the script.

Member Avatar for umakantp
0
6K
Member Avatar for whiteyoh

Instead of using preg_replace() use str_replace(). It a lot faster. If you need regular expression functionality, then you'd have to use preg_replace.

Member Avatar for blocblue
0
92
Member Avatar for bimalnayak

You can use SET in a MySQL insert statement: [url]http://dev.mysql.com/doc/refman/5.1/en/insert.html[/url] The best way to see what that error is, is to check for errors when you execute a query. Eg: [CODE]$result5=mysql_query($query5); if (!$result5) { echo mysql_error(); }[/CODE] Calling mysql_query() should automatically trigger an error. But if you have error output …

Member Avatar for digital-ether
0
115
Member Avatar for tleisher

[QUOTE=tleisher;402819]Hi, I have two websites. I have an RSS feed from one that I want to host on the other, just the headlines and links back to the second website... Right now I'm using SimpleXML and fopen/fclose to bring in the XML documents. But for some reason it's not working... …

Member Avatar for Vivekkrgupta
0
131
Member Avatar for mangel.murti

[QUOTE=ivatanako;1240529]Hi, Here's another option, try using cron jobs. [CODE]find /yourdir/tmp -mtime +1-exec rm {}[/CODE] 1 is the xx days. Regards, Al[/QUOTE] Don't you need to close the statement after -exec ? [CODE]find /yourdir/tmp -mtime +1-exec rm {} \;[/CODE]

Member Avatar for mangel.murti
0
162
Member Avatar for nonshatter

Yes, you can use Wordpress. Are you familiar with it? If not, I'd suggest installing a few CMSs and seeing which you find suitable. Some good PHP ones are Drupal, Joomla, Symphony CMS etc. (It is better to spend time to test a few, rather then make the mistake that …

Member Avatar for digital-ether
0
89
Member Avatar for Designer_101

If you're working with a developer you don't trust much, it would probably be better if you have a development server that both can play with, and you only have access to the production server. Or even better you can install version control software on your server and only offer …

Member Avatar for digital-ether
0
133
Member Avatar for freiheit

What is the structure of: $row_Totals_i Please do a dump of it to see it's structure and post it here. eg: [CODE]var_dump($row_Totals_i);[/CODE] With the limited info given, it is hard to get what is wrong.

Member Avatar for rajarajan2017
0
106
Member Avatar for tiggsy

mysql_query() only supports one query at a time. note: you can grant permissions to users via SQL querys on Cpanel hosts, you just need to be doing so under a user with the grant option and also the privileges you are granting. [url]http://dev.mysql.com/doc/refman/4.1/en/grant.html[/url]

Member Avatar for nileshgr
0
2K
Member Avatar for knight fyre

[QUOTE=ShawnCplus;564746]Without rival the most useful javascript debugger/general web development tool is [url=http://getfirebug.com]FireBug[/url] in combination with [url=http://chrispederick.com/work/web-developer/]Web Developer Toolbar[/url]. Firebug has a very powerful debugger complete with conditional breakpoints and source tracing. Web Developer Toolbar has a veritable cornucopia of handy tools for web developers.[/QUOTE] Firebug wins hands down!

Member Avatar for helioptra
0
274
Member Avatar for lonestar23
Member Avatar for ElegantElephant

It is not a good idea to actually have the auto_increment column value in your insert. For very low frequency inserts it will work, but if there are every two inserts close to each other you have the chance they will try and insert the same value for the auto_increment …

Member Avatar for loganphp
0
4K
Member Avatar for fawad123
Member Avatar for digital-ether
0
121
Member Avatar for muralibobby2015

You can validate email addresses before actually sending emails. First you can validate the syntax. That is check if the email address is of valid format. Then you can try validation via SMTP: [url]http://code.google.com/p/php-smtp-email-validation/[/url] As for validation within emails, to see if they were opened, you can embed images that …

Member Avatar for pritaeas
0
219
Member Avatar for hassal

Just do a dump of the variable to see if you got it correctly. [CODE]$file = JRequest::getVar( 'img2', null, 'files', 'array' ); var_dump($file); die;[/CODE]

Member Avatar for hassal
0
198
Member Avatar for Fost

You can use file_get_contents(). Just add the user and password to the url in the form: [url]http://user:[email protected]/path/to/file.xml[/url] Or you can specify the http header to send in the stream context parameter. eg: [CODE]$context = stream_context_create(array( 'http' => array( 'method' => 'GET', 'header' => sprintf("Authorization: Basic %s\r\n", base64_encode($username.':'.$password)), 'timeout' => 5, …

Member Avatar for Fost
0
209
Member Avatar for brenton_77

What programming language are you using on the server side? I think you'll have more help in the appropriate forum for that language.

Member Avatar for digital-ether
0
639
Member Avatar for Makall

The form will be submitted to where the action parameter specifies. eg: [CODE]<form method="post" action="parser.php">[/CODE] will be submitted to parser.php You can redirect to a different page using a HTTP redirect from that page after processing a form. Eg: [CODE]header("Location: /index.php");[/CODE] will take you back to /index.php.

Member Avatar for digital-ether
0
340
Member Avatar for kirtan_thakkar

You'll need the filesystem functions: [url]http://php.net/manual/en/ref.filesystem.php[/url] or with PHP5 you can use OO equivalent functionality: [url]http://php.net/manual/en/class.directoryiterator.php[/url]

Member Avatar for digital-ether
0
128
Member Avatar for Zagga

The two main things here is: 1) Saving the form field values added by the user 2) Returning to the form without the "resend post" message [B]Saving the form field values added by the user[/B] The only way to save the values effectively is to save them server side (or …

Member Avatar for digital-ether
0
153
Member Avatar for digiplaystudios

After the mysql_query() do some error checking. It will let you know what went wrong with the query. Example: [CODE]if (!$result) { trigger_error("MySQL error: ".mysql_error(), E_USER_ERROR); }[/CODE] I believe the problem is that DATE is a function so you need to escape it in the SQL query.

Member Avatar for digiplaystudios
0
275
Member Avatar for fizanos

Please post problems you're having, instead of the whole task. I'm sure no-one will want to do the work you're getting paid for, for free. :)

Member Avatar for digital-ether
0
157
Member Avatar for toradh77

[QUOTE=toradh77;1239093]Hi all in daniweb, I attempted some form validation but I seem to have made a complete mess of it. Before I introduced the validation and regular expressions it was working fine but because I'm not really sure of this topic I made some syntax errors. I would really appreciate …

Member Avatar for digital-ether
0
158
Member Avatar for ajithraj

[QUOTE=ajithraj;516098]haii friends.... [COLOR="Red"]i want to select a particular string from textarea...i need it in javascript.... am using the tag <layout:textarea> i did not need the whole ,but only a part...plzz help me...[/COLOR][/QUOTE] What markup language are you using? In HTML a text area is just <textarea>. You'll need a reference …

Member Avatar for fxm
0
236
Member Avatar for floresj4

Hi, How are you using the PHP files in Joomla? Joomla requires your php files to be structured into components, or modules, or plugins... Are you asking how to use the php files with Joomla, or just php in general? :)

Member Avatar for jwd.adodis
0
276
Member Avatar for gptArun

[QUOTE=gptArun;988612]Hello everybody, I have to edit joomla left panel contents but didn't find code. how would do this? i chk administrator part where i cant change/add links. But not found code other than "<jdoc:include type="modules" name="left" style="rounded" />" in index file. somebody help me out !![/QUOTE] Do you want to …

Member Avatar for jwd.adodis
0
90
Member Avatar for Blitz-labs.com

You cannot place statements as parameters. You need to create your HTML in a string, and then do the replacement with that string as the parameter. eg: [CODE]session_start(); if(!session_is_registered(username)) { $html = 'href="http://www.mywebsite.com/Login.php" title="Login">Login</a>'; } else { $html = 'href="http://www.mywebsite.com/logout.php" title="Logout">Logout</a>'; } $template = str_replace ("{_SIDE_URL1_}", $html, $template);[/CODE] Here you …

Member Avatar for Blitz-labs.com
0
168
Member Avatar for rutaba

You can definitely send SMS for free, but reliability isn't a feature. Here is a list of Email to SMS gateways. [url]http://en.wikipedia.org/wiki/List_of_carriers_providing_SMS_transit[/url] I've used it in the past, to send SMS and works most the time. You just need to construct the email address for each phone number based on …

Member Avatar for rajeesh_rsn
0
169
Member Avatar for nizbit

It doesn't matter if you use pear or mail(), an email server configured to deny senders that do not have accounts on the mailserver will not send email with different sender addresses. If your mail server sends email with sender addresses with accounts not on the server, then you essentially …

Member Avatar for digital-ether
0
1K

The End.