as above when a user is logged into my website, I want it to say hello or welcome "user"
i'm using the code below:
[code]
<?php
$user = $_GET['session_is_registered'];
echo ('$user');
?>
[/code]
but the php just displays "$user"
what am I doing wrong?
thanks
...
If I haven't setup FastCGI or mod_php, does that mean my vanilla Apache2 uses CGI for PHP?
...
I have created a PHP class called formChecker.php. It validates a form. As a Java programmer, I would like to stick with the idea of creating an instance of this class in another class and run it from there. It doesn't seem to be working for me.The following is a demonstration:
class formChecker{
..... validation functions go here
}...
I have a mySQL database with a timestamp field. It currently only has one entry while I'm testing, it is
2010-02-20 13:14:09
I am pulling from the database and using
echo date("m-d-Y",$r['newsDate'])
My end result is showing as
12-31-69
Anyone know why?
Edit:
editedit:
disregard that edit... the FTP addon for notepad++ timed ou...
how to display multiple checkboxes value in ajax language?
...
There is an annoying bug in Firefox where navigation in a dynamically created iframe, which is then removed via Javascript, results in the inability to go back using the Firefox back button (you have to use the drop down and navigate back a further couple of pages).
I am using a form in an iframe which validates and submits data. On fo...
Hi, I'm working on learning to use prepared statements with mysqli in PHP and usually, if I'm having a problem with a query I just echo it to the screen to see what it looks like as a first step.
How can I do that with a prepared statement?
I'd like to see the SQL statement after the variables are substituted.
...
Everything was working fine in 1.9.6. I changed to 1.10 and now I have a lot of Warning for basically every Application Resource.
It looks like the ZF is looking for Application Resources in the "custom resources" path that I set up from: pluginpaths.App_Application_Resource = "App/Application/Resource.
Is there any way to avoid this!?...
Is it possible to get the md5 of a file on a remote server? If so how?
...
Hello folks,
I'm currently starting to write my own CMS in php from ground up using CakePHP (or should i use something else?) for my bachelors degree. And i'm thinking about various stuff that will be needed to do.
One of the things i can not figure out is if i should use a single file (for example, index.php will handle everything, an...
Need some guidance and ideally some first-hand experience.
We committed to a php framework which, shortly after we built the first rev of the product, stopped all development on the framework for about a year, forked twice, and doesn't really have a big community to begin with, meaning no plugins, tutorials, etcetera.
For another proje...
I've been asking similar questions here today, but I'm seeing I think the issue is with how I am calling my data?
I'm trying to replace a nav bar with ajax that will load contents into a div.
The nav bar is this:
<ul>
<li><a href="javascript:void(0)" onclick="getData('/includes/view-monthly-calendar-ajax.php', 'targetDiv')">Monthly<...
Hello all,
I have this:
$dbh = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$mdbFilename", $username, $password);
$sql = "SELECT * FROM this_table";
$stmt = $dbh->query($sql);
//num of rows?
How do I get the number of rows returned from that SELECT statement?
Thanks all
...
Is there a function in PHP that adds quotes to a string?
like "'".str."'"
This is for a sql query with varchars. I searched a little, without result...
I do the following:
$id = "NULL";
$company_name = $_POST['company_name'];
$country = $_POST['country'];
$chat_language = $_POST['chat_language'];
$contact_firstname = $_POST[...
is there a way to tell preg_match_all to find all sequences that matches a certain pattern but omits another pattern?
eg.
<a>computers</a>
<a>books</a>
<a>pens</a>
i want to match books and pens but not computers.
so using:
preg_match_all('/<a>.*?<\/a>', $string, $array);
wont do.
would appreciate some help with this. thanks!
...
I'm having some trouble using MySQLi to insert values into a database. I don't get any errors, but the values being inserted are not correct at all. One of the TEXT fields is always empty, and the other one always has the value "ý". The INT field always contains the value 50396416. I am using utf8_general_ci.
CREATE TABLE events (
i...
I am facing an error with my web app that uses Facebook connect that occurs when the user has both my web app open and Facebook.com open and logs out of Facebook.com. Since my app and the Facebook Connect library is unaware that the session is no longer valid, when it tries to user certain Facebook Connect functions that require a valid ...
I have 2 array, the value will be from database, below is the case example:
$arr1 = array(1,2,3);
$arr2 = array(1,2,3,4,5,6,7);
What I want to do is to check if all values in $arr1 is exist in $arr2. the above example should be a TRUE while:
$arr3 = array(1,2,4,5,6,7);
comparing $arr1 with $arr3 will return a FALSE.
Normally I use...
i've got an array with string values.
i want to search for a pattern with regex and if matched, remove the key containing the value.
how would i accomplish this?
...
Hey there :)
Now that I've read all the DQL docs I still have some doubts, I'm
trying to do some nested condictions in my DQL however playing around
with DQL I can't seem to be able to archive them
To make myself more clear:
I have this DQL query
$q = Doctrine_Query::create()
->select('c.nombre,c.webpage')
->addSe...