Yo. I'm trying to make a simple login system in PHP and my problem is this: I don't really understand sessions.
Now, when I log a user in, I run session_register("user"); but I don't really understand what I'm up to. Does that session variable contain any identifiable information, so that I for example can get it out via $_SESSION["user...
i've got some elements in a xml document i want to delete. so i want to create another xml document without those elements.
here is an example of how it looks like at the moment:
<entity id="1000070">
<name>apple</name>
<type>category</type>
<entities>
<entity id="7002870">
<name>mac</name>
<...
I need to use sharedbook API for a funeral home website?
...
I have the following. Two mysql tables. I want to copy info that has changed from table a to b.
For example if row 1 column 2 has changed in table a I want to only update that column in table b. Table b is not the same as a but has same columns that also exist in a. The other solution I have is to just clear table b and replace it with ...
Hi all,
How to create a thumbnail image with embedded video code. For example i am having the following embedded code:
> <object width="480"
> height="385"><param name="movie"
> value="http://www.youtube.com/v/6r-mz0dh6cs&hl=en_US&fs=1&"></param><param
> name="allowFullScreen"
> value="true"></param><param
> nam...
I'm unfortunately having an unknown error with my php file. (for joomla 1.5)
I don't seem to get what's wrong.
This is my entire code, with an apparent error on line 84. Would appreciate some feedback, thanks.
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
if ( ! defined('modMainMenuXMLCallbackDefined') )
...
How to add an error message to Zend Form element after the form was already validated?
I'm trying to add error mesages I get from Zend_Auth (now I'm displaying them using flashMessenger).
I tried something like this:
$form->getElement('username')->addErrorMessage('my message');
...
I have installed amateras in eclipse. I have active amateras view :
But the pallete items is locked. Not drag and drop or right click is avaiable. What is the problem in my installation?
Thanks in advance
...
I've tried a variety of combinations, the following being my last attempt:
Addtype text/vnd.wap.wml wml
Addtype image/vnd.wap.wbmp wbmp
AddType text/vnd.wap.wmlscript wmls
AddType application/vnd.wap.wmlc wmlc
AddType application/vnd.wap.wmlscriptc wmlsc
AddType application/x-httpd-php .wml
How can I get stupid Apache 2.2.11 to parse...
Hi,
I am (newbie) using Kohana V 3.0.3 and my directory structure is:
pojectsys (kohana's system directory) parallel to htdocs directory
C:\xampp\pojectsys
and my application directory is in htdocs
C:\xampp\htdocs\examples
Inside C:\xampp\htdocs\examples\index.php, following variables have been set:
$application = 'C:\xampp\htdocs\...
I am considering to move frome Microsoft languages to PHP (just for web dev) which has quite an interesting syntax, a perlish look (but a wider programmer base) and it allows me to reuse the web without reinventing it. I have some concerns too. I would be more than happy to gather some wisdom from stackoverflow community, (challenge to m...
Hi,
we're having this toshiba barcode printer. I'm not sure whether this problem is hardware or php related.
When we send a ° (degree-sign) it prints a € (euro-sign).
I also tried brute-forcing iconv():
$a = array("UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256", "cp850");
foreach ($a as $enc){
if ...
I have a start and end time in a timestamp format. I want to split these into timeslots of e.g 1 hour.
$t1 = strtotime('2010-05-06 12:00:00');
$t2 = strtotime('2010-05-06 18:00:00');
$timeslots = array();
while ($t1 < $t2) {
$t1 = $t1 + 3600;
$timeslots[] = $t1;
}
foreach ( $timeslots as $slot ) {
echo date("Y-m-d H:i:s", $slot) . '<...
I keep getting this as a warning I want to avoid getting this warning when it is undefined without turning warnings off
here is the context
$url_items = array("foo");
$article_id = db_escape($url_items[1]);
$article = get_article($article_id);
function get_article($article_id = NULL) {.....}
...
I'm looking for a solid open-source commenting engine written in PHP. It needs to have workflow/moderation capabilities as well.
I've checked into Disqus, and while I like the concept, the site owner's may develop their own login system at a later point, which would have to integrate with the comment system. Also, I'm not sure that th...
I'm working on a PHP script that runs a Python script on the server. My server is running CentOS 5.4 with Apache 2.2.3 and PHP 5.1.6.
This is the PHP code:
chdir("/home/cjones/git/pywrapper");
$output = shell_exec("python /home/cjones/git/pywrapper/wrapper.py");
This give me this error:
Warning: chdir() [function.chdir]: Permission...
I have a small contact form:
<form method="post" action="contact.php" name="contactform" id="contactform">
<fieldset>
<legend>Please fill in the following form to contact us</legend>
<label for="name"><span class="required">*</span> Your Name</label>
<input name="name" type="text" id="name" s...
Hello, is it good, that every PHP class implements a Singleton pattern? I think, it will be less memory usage because of it. Is it right opinion? Thanks!
...
Is that a good practice to store the objects of the domain model in the PHP session ?
This would enable to avoid to query and reconstruct every PHP object to each PHP request.
Is there a size limit ?
...
I'm using PHP to read if an entry in my table on the database is set to "yes" or "no" and auto check the radio button that corresponds:
<?php include 'file.php';
$query = "SELECT * FROM TABLE";
$runquery = odbc_exec($connect,$query);
$status= odbc_result($runquery,"status");
odbc_close($file);
?>
<form>
<div class="formContainer">
...