xoops forums

wcrwcr

Home away from home
Posted on: 2006/8/27 4:05
wcrwcr
wcrwcr (Show more)
Home away from home
Posts: 1114
Since: 2003/12/12
#1

Alumni , parse error on printing

Hi all

Trying to print one of the listings i?m getting this error:


Parse error: parse error, unexpected '?', expecting ',' or ')' in c:\mysite.com\modules\alumni\listing-p-f.php on line 230

Here follow the lines 230 through 233 from file "listing-p-f.php"

$yname = isset($_POST['yname'] ? $myts->addSlashes($_POST['yname']) : '';
$ymail = isset($_POST['ymail'] ? $myts->addSlashes($_POST['ymail']) : '';
$fname = isset($_POST['fname'] ? $myts->addSlashes($_POST['fname']) : '';
$fmail = isset($_POST['fmail'] ? $myts->addSlashes($_POST['fmail']) : '';


Any tip?
Thanks
Posted on: 2006/8/27 4:20
jensclas
jensclas (Show more)
Posts: 2089
Since: 2004/10/31
#2

Re: Alumni , parse error on printing

Seacrh is a great tool!

FAQ on Parse erros here - and other things come up in search.

wcrwcr

Home away from home
Posted on: 2006/8/27 5:26
wcrwcr
wcrwcr (Show more)
Home away from home
Posts: 1114
Since: 2003/12/12
#3

Re: Alumni , parse error on printing

hi jensclas

thank you

But as you can see by the number os my posts, i?ve been around for a while and know how try to find some info

and believe me i did it before

anyway thanks for your time

jlm69

Module Developer
Posted on: 2006/8/27 7:09
jlm69
jlm69 (Show more)
Module Developer
Posts: 719
Since: 2002/7/19
#4

Re: Alumni , parse error on printing

There is a ) missing after the ['yname'] but change all those lines

$lid = isset( $_GET['lid'] ) ? intval($_GET['lid']) : '' ;
$op = isset($_POST['op']) ? $_POST['op'] : '' ;
$op = isset($_GET['op']) ? $_GET['op'] : $op ;

$yname = isset($_POST['yname'] ? $myts->addSlashes($_POST['yname']) : '';
$ymail = isset($_POST['ymail'] ? $myts->addSlashes($_POST['ymail']) : '';
$fname = isset($_POST['fname'] ? $myts->addSlashes($_POST['fname']) : '';
$fmail = isset($_POST['fmail'] ? $myts->addSlashes($_POST['fmail']) : '';

to

$yname = !empty($_POST['yname']) ? $myts->makeTboxData4Save($_POST['yname']) : "";
$ymail = !empty($_POST['ymail']) ? $myts->makeTboxData4Save($_POST['ymail']) : "";
$fname = !empty($_POST['fname']) ? $myts->makeTboxData4Save($_POST['fname']) : "";
$fmail = !empty($_POST['fmail']) ? $myts->makeTboxData4Save($_POST['fmail']) : "";

if(!isset($_POST['lid']) && isset($_GET['lid']) ) {
$lid = intval($_GET['lid']) ;
}else {
$lid = intval($_POST['lid']) ;
}

$op= '';
if (!empty($_GET['op'])) {
$op = $_GET['op'];
} elseif (!empty($_POST['op'])) {
$op = $_POST['op'];
}


I will change them in the download

Thanks,

John
Posted on: 2006/8/27 16:44
jensclas
jensclas (Show more)
Posts: 2089
Since: 2004/10/31
#5

Re: Alumni , parse error on printing

@wcrwcr...I had thought that but you did ask for 'any tip'and didn't indicate you had tried search. Being unfamiliar with the module it was the best I could do to offer a 'tip'. Glad the module dev Jlm69 came along. Hope it works for you.

wcrwcr

Home away from home
Posted on: 2006/8/28 8:35
wcrwcr
wcrwcr (Show more)
Home away from home
Posts: 1114
Since: 2003/12/12
#6

Re: Alumni , parse error on printing

Hi jlm69

It works like a charm

Thank you