Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help identifying unexpected t_variable
Old 08-25-2009, 09:56 PM [SOLVED] Help identifying unexpected t_variable
Skilled Talker

Posts: 90
Trades: 0
Just a quick question for someone with a better PHP eye than me...

I'm getting this error:

Code:
Parse error:  syntax error, unexpected T_VARIABLE in /[directory]/test.php on line 22
In this code...

PHP Code:
<?php
require_once("../[directory]/api/api.php");
$fields ft_api_init_form_page(28);
 
// validation time!
$errors = array();
if (isset(
$_POST['submit']))
{
  
$rules = array();
  
$rules[] = "required,how_they_heard_about_us,Please select a referral source.";
  
$rules[] = "required,email,Please enter your email address.";
  
$errors validate_fields($_POST$rules);
 
  
// no errors - great! Now we process the page. The ft_api_process_form does
  // the job of both updating the database and redirecting to the next page
  
if (empty($errors))
  {
      
$criteria = array(
  
"email" => $_POST["email"]
);
if (
ft_api_check_submission_is_unique(28 $criteria))
{
  
// uh-oh! A submission already exists with this email address! Abort, abort! 
  // here, you could do something like set a variable like: $already_exists = true
  // and in the webpage do a little test to see if it's set. If so, let the user know 
  // what's going on
  
  
$already_exists true;
  
}
else
{
  
// call ft_api_process_form function here to continue processing the form submission
      
$params = array(
      
"submit_button" => "submit",
      
"next_page" => "thanks.php",
      
"form_data" => $_POST,
      
"finalize" => true
    
);
    
ft_api_process_form($params);
  
}      
      
      

  }
}
?>
But for the life of me I can't seem to figure out where the t_variable is...

Any help would be greatly appreciated -- thanks!


EDIT: had to put in a comma between 28 and $criteria...

Last edited by msaz87; 08-26-2009 at 12:32 AM.. Reason: solved
msaz87 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-26-2009, 06:23 AM Re: Help identifying unexpected t_variable
lizciz's Avatar
Webmaster Talker

Posts: 744
Name: Mattias Nordahl
Location: Sweden
Trades: 0
The number 28 shouldn't be there. In the line

if (ft_api_check_submission_is_unique(28 $criteria))


EDIT: Oh, Didn't see your edit. So the problem's solved then?
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366

Last edited by lizciz; 08-26-2009 at 06:25 AM..
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to Help identifying unexpected t_variable
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10023 seconds with 12 queries