1
wcrwcr
Alumni , parse error on printing
  • 2006/8/27 8:05

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


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

2
jensclas
Re: Alumni , parse error on printing

Seacrh is a great tool!

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

3
wcrwcr
Re: Alumni , parse error on printing
  • 2006/8/27 9:26

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


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

4
jlm69
Re: Alumni , parse error on printing
  • 2006/8/27 11:09

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


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

5
jensclas
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.

6
wcrwcr
Re: Alumni , parse error on printing
  • 2006/8/28 12:35

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi jlm69

It works like a charm

Thank you

Login

Who's Online

220 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits