Parse error: syntax error, unexpected '{', expecting '(' in /home/a7237281/public_html/include/session.php on line 313
this is the error i get, relating to this code
//check the emails
$field = "email"; //Use field name for email
$field2 = "email2";
if(!$subemail || strlen($subemail = trim($subemail)) == 0)
{
$form...
This include is not working in IE:
<?php
include_once 'localization.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Global...
I want to know if there's a way to check in a php script if exec() is enabled or disabled on a server..
Thanks!
...
I'm pretty sure i'm doing an extra loop here:
$q = "SELECT * FROM genres WHERE genre.g_url = '$genre_url' LIMIT 1";
$res = mysql_query($q);
while ($r = mysql_fetch_array($res, MYSQL_ASSOC)){
foreach( array_keys($r) as $k ){
$g[$k] = $r[$k];
}
}
return $g;
...
Hi there,
I've got this code which i execute on phpmyadmin which works 100%
Create Temporary Table Searches ( id int, dt datetime);
Create Temporary Table Searches1 ( id int, dt datetime, count int);
insert into Searches(id, dt) select a.id, now() from tblSavedSearches a;
insert into Searches1(id, dt, count)
select
b.savedSea...
I've been trying left joins but as there are 2 joins, i think the problem is the 2nd join roots from table_B not table_A. i am not getting any results where there is the required data in the db. I am not getting a query error
the query (simplified)
SELECT events.*, ven.*, events_genres.*
FROM events
LEFT JOIN ven ...
Hi all,
How to search multiple values separated by commas.
ex:
table name : searchTest
id name keyword
1 trophy1 test1,test2,test3
2 trophy2 test2,test5
Points:
If i search for test2 both results trophy1 and trophy2 should be display.
If i search for trophy1 then trophy1 should be as result.
How to solve t...
I want to return the value of open_basedir in a php script.. how can I do it?
If value is blank it should echo that is blank..
Thanks!
...
What are the difference between them?
...
I made session using zend authentication it works good but my problem is I want to change some property of it from another action in other controller my code is:
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity()) {
$blogId = new model_blog request;
$auth->getIdentity()->user_current_blog = $blogId;
print "Current Blo...
Hi guys I'm trying to read through an email inbox for my application - I'm using the zend framework here. The problem is that I'm unable to retrieve the message body for certain emails. The following is my code as to how I'm doing this:
$mail = new Zend_Mail_Storage_Imap($mail_options);
$all_messages = array();
$page = isset($_GET['pa...
function ag()
{
echo '2';
}
Ag();
class test {
function clMe()
{
echo 'hi';
}
}
$instance = new test;
$instance->clme();
But that's the not case with variables,
what's the rationale in it?
...
I have an array of categories, some with an & i.e. events & entertainment.
My script imports these categories and gets the ID of each using its name.
i.e.: $cat_id = array(get_cat_id($linearray[0]),get_cat_id($linearray[1]),get_cat_id($linearray[2]),get_cat_id($linearray[3]));
My script then adds a post to wp using these category ID's.
M...
Hi
Iam looking for a php parser that can do this.
{tag} Replace the tag with text comming from a function
{tag(params)} It must support params
{tag({tag(params)},{tag(params)})} It must support nesting
{tag()?
else
} It must support Tests
{$tag=value} It must support varriables
Do anyone of you know of an parser that can do thi...
The following code:
print_r($_GET);
echo '<br />';
echo isset($_GET['logout'])?'yes':'no';
prints:
Array ( [logoout] => )
no
Why is it printing "no" instend of "yes"?
...
Hi.
I would like to make my own program but I have no idea how.. for example I want to make a typical 'Hello $user' program.
So..
├── hi
│ ├── hi.sh
│ ├── hi_to.sh
hi.sh
#!/bin/bash
~/hi/hi_to.sh $1
hi_to.sh
#!/usr/bin/php
<?php
echo "\nHellO ".$argv[1]."\n";
?>
Run it in terminal:
me:~/hi
→ ./hi.sh User
He...
does one create an admin front-end from scratch for every web application (not CMS sites)?
are there any tools for aiding this process?
some tutorials?
share your thoughts and experiences!
...
Hi,
I am building a template system for emailing people that currently works in the format of:
$array['key1'] = "text";
$array['key2'] = "more text";
<!--key1--> // replaced with *text*
<!--key2--> // replaced with *more text*
For this particular project I have a nested array with this kind of structure:
$array['object1']['nest1']['...
The below code is fetched from php.net (http://docs.php.net/manual/en/domdocument.savexml.php). My problem is - it doesn't work. My only output from this is: "Saving all the document: Saving only the title part:". What am I missing here?
$doc = new DOMDocument('1.0');
// we want a nice output
$doc->formatOutput = true;
$...
whenever i use a open source library eg. Doctrine i always ending up coding a class (so called Facade) to use the Doctrine library.
so next time i want to create a user i just type:
$fields = array('name' => 'peter', 'email' => '[email protected]');
Doctrine_Facade::create_entity($entity, $fields);
then it creates an entity with the ...