# Solved: Warning: Missing argument 4



## jleigh (Nov 1, 2002)

I have a raffle plugin running on my site and I keep getting this error whenever someone tries to buy a ticket

Warning: Missing argument 4 for generateticket() in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 136

Here is line 136

function generateticket($user,$rid,$howmany,$member)

Can someone please explain to me what the problem is?


----------



## Sequal7 (Apr 15, 2001)

Can you provide the code to the page, it seems to be a script value not configured, or missing.

The code calling the function could be the problem, but without knowing more of the code I cant be sure.
Is this array correct?
$rid,


----------



## jleigh (Nov 1, 2002)

i don't know what an array is LOL

Here is more code:

function generateticket($user,$rid,$howmany,$member)	{ $sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid"; $a = mysql_query($sql); $info = mysql_fetch_row($a); $tid = $info[0]; for($i=1;$i<=$howmany;$i++) { $tid+=1; $sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values($rid,'$user',$tid,'$member')"; mysql_query($sql); }


----------



## Sequal7 (Apr 15, 2001)

Can you please edit your posting and wrap that into php tags, it is too hard to decipher with the code all in one cluster, it needs to be in its original format.

Thanks


----------



## jleigh (Nov 1, 2002)

```
<?	function how_many_raffle($crt='on')  //CRT IS STATUS OF RAFFLE	{		global $mysql_database,$mysql_prefix;		$sql="SELECT count(rafid) from ".mysql_prefix."raffle_info where status='$crt' order by rafid desc";		$a = mysql_query($sql);		$am = mysql_fetch_row($a);		return $am[0];	}	function get_raffle($crt='on')	{		global $mysql_database,$mysql_prefix;		$sql="SELECT rafid,rafstartdate from ".mysql_prefix."raffle_info where status='$crt' order by rafid desc";		$a = mysql_query($sql);		return $a;	}	function get_a_raffle($rid)	{		global $mysql_database,$mysql_prefix;		$sql="SELECT rafid,rafstartdate,rafenddate,prize,totalticket,tickettype,emailmsg,winnername,winningticket,status,ticketprice,commission,comm_type,payments from ".mysql_prefix."raffle_info where rafid=$rid";		$a = mysql_query($sql);		return $a;	}	function get_raffle_buyers($rid)	{		global $mysql_database,$mysql_prefix;		$sql="SELECT distinct username, count(ticketid), member from ".mysql_prefix."raffle_tickets where rafid=$rid group by username";		$a = mysql_query($sql);		return $a;	}	function how_many_sold($rid)	{		global $mysql_database,$mysql_prefix;		$sql="SELECT count(*) from ".mysql_prefix."raffle_tickets where rafid=$rid";		$a = mysql_query($sql);		$p = mysql_fetch_row($a);		return $p[0];	}	function get_user_tickets($username,$rid)	{		$a = @mysql_query("SELECT count(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid and username='$username'");		list ($tickets) = @mysql_fetch_row($a);		return $tickets;	}  function get_buyer_details($rid, $ticketid)  {     if ($from_tickets = @mysql_fetch_assoc(                                           @mysql_query("SELECT username, member FROM ".mysql_prefix."raffle_tickets WHERE rafid = $rid AND ticketid = $ticketid LIMIT 1")                                     ))    {       if ($from_tickets['member'] == "yes") {         $details = @mysql_fetch_assoc(                                 @mysql_query("SELECT username, email, pay_type, pay_account FROM ".mysql_prefix."users WHERE username = '$from_tickets[username]'")                          );       } else {         $details = @mysql_fetch_assoc(                                 @mysql_query("SELECT username, email, pay_type, pay_account FROM ".mysql_prefix."raffle_buyers WHERE uid = '$from_tickets[username]'")                          );       }       $details['member'] = $from_tickets['member'];    } else return false;    return $details;  }	function chosewinner($rid)	{		$sql="SELECT ticketid from ".mysql_prefix."raffle_tickets where rafid=$rid";		$a = mysql_query($sql); $i = 0;    if (@mysql_num_rows($a) > 0) {		  while($c = mysql_fetch_row($a))			  $winners[$i++]=$c[0];      srand((double) microtime() * 1000000);		  $mywinner = array_rand($winners);      return $winners[$mywinner];    } else {      return 0;    }	}	function winner_notify($winner, $email, $rid)	{		$a = get_a_raffle($rid);		$info = mysql_fetch_row($a);		$prize = $info[3];		$msg = $info[6];		$subject = "You are the Winner !!!";		$message = "Hello $winner,\n\n$msg";    sendmail($email, $subject, $message, support_email);	}  function support_notify($winner, $email, $rid, $prize)  {		$subject = "Raffle with id $rid ended.";		$message = "Hello admin,\n\nRaffle with id $rid and prize '$prize' is over.\n\nThe winner is $winner. Please give him the prize.";    sendmail(support_email, $subject, $message, $email);  }	function end_raffle($rid){		global $mysql_database,$mysql_prefix;		$info = get_a_raffle($rid);		$inf = mysql_fetch_row($info);		$status = $inf[9];		if($status=='on')		{			$today = Date('Y-m-d');			$winner_ticket = chosewinner($rid);      if ($winner_ticket > 0) {        $details = get_buyer_details($rid, $winner_ticket);			  $winner_name = $details['username'];			  winner_notify($details['username'], $details['email'], $rid);         support_notify($details['username'], $details['email'], $rid, $inf[3]);      } else {        $winner_name = 'No winner!';      }      mysql_query("UPDATE ".mysql_prefix."raffle_info set rafenddate='$today', winnername='$winner_name',	winningticket='$winner_ticket', status='off' where rafid=$rid");			$success = true;		}		else			$success = false;		return $success;	}	function generateticket($user,$rid,$howmany,$member)	{		$sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid";		$a = mysql_query($sql);		$info = mysql_fetch_row($a);		$tid = $info[0];				for($i=1;$i<=$howmany;$i++)		{			$tid+=1;			$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values($rid,'$user',$tid,'$member')";			mysql_query($sql);		}				$row=get_a_raffle($rid);		$info = mysql_fetch_row($row);		$totalticket = $info[4];		$status = $info[9];		$sold = how_many_sold($rid);		if($sold>=$totalticket && $status=='on')			$a = end_raffle($rid);	}	function redirect($link)	{		echo "";	}		function get_settings($name)	{	  $res = @mysql_query("SELECT value FROM ".mysql_prefix."raffle_settings WHERE name = '$name'");	  	  if (list ($value) = @mysql_fetch_row($res)) {	    return $value;	  } else { return false; }	}		function set_settings($name, $value)	{	  $res = @mysql_query("REPLACE INTO ".mysql_prefix."raffle_settings (name, value) VALUES ('$name', '$value')");	  	  return $res;	}  function pay_commission($refid, $rid, $amount)  {    $raffle = @mysql_fetch_assoc(get_a_raffle($rid));    if (($raffle) && ($raffle['commission'] != '')) {      $res = @mysql_query("SELECT username FROM ".mysql_prefix."users WHERE username = '$refid'");      if (@mysql_num_rows($res) > 0) { // this user exists so pay him commission        if ($raffle['comm_type'] == 'percent') { $amount = $amount * ($raffle['commission'] / 100); } else { $amount = $raffle['commission']; }        $bonus = $amount * 100 * 100000;        @mysql_query("INSERT INTO ".mysql_prefix."accounting 	(transid,unixtime,username,description,amount,type) values('".maketransid($refid)."', ".unixtime.", '".$refid."', 'Raffle Commission', $bonus, 'cash')");      }    }  }  function add_buyer($rid, $uname, $email, $pay_type, $pay_account)  {    $res = @mysql_query("SELECT uid FROM ".mysql_prefix."raffle_buyers WHERE rafid = $rid AND email = '$email'");    if (@mysql_num_rows($res) == 0) {      @mysql_query("INSERT INTO ".mysql_prefix."raffle_buyers (rafid, username, email, pay_type, pay_account) VALUES ($rid, '$uname', '$email', '$pay_type', '$pay_account')");      $result = @mysql_insert_id();    } else {      list ($result) = @mysql_fetch_row($res);    }    return $result;  }  function email_exists($email)  {    $res = @mysql_query("SELECT username FROM ".mysql_prefix."users WHERE email = '$email'");    if (@mysql_num_rows($res) > 0) {      $row = @mysql_fetch_row($res);      return $row[0];    } else {      return false;    }  }  function purchase_tickets($price, $tickets, $pay_type, $pay_account, $uname, $email, $rid, $refid)  {    $raffle = @mysql_fetch_assoc(get_a_raffle($rid));    $sold = how_many_sold($rid); $expected_price = round($raffle['ticketprice'] * $tickets, 2);    if (($tickets <= ($raffle['totalticket'] - $sold)) && ($expected_price == $price)) {      // price match tickets available to buy      $username = email_exists($email);      if ($username === false) {        $user_id = add_buyer($rid, $uname, $email, $pay_type, $pay_account);      } else {        $user_id = $username;      }      if (($refid != '') && ($refid != $username)) pay_commission($refid, $rid, $price);      generateticket($user_id , $rid , $tickets , ($username === false ? 'no' : 'yes'));    }  }  function unique_payment($transid, $pay_type, $amount)  {    $a = mysql_query("SELECT * from ".mysql_prefix."raffle_payments where transid='$transid' and system='$pay_type'");	  if(@mysql_num_rows($a) <= 0) {      @mysql_query("INSERT INTO ".mysql_prefix."raffle_payments (transid, amount, system) VALUES ('$transid', $amount, '$pay_type')");      return true;    }    return false;  }  function paypal_form($username, $email, $rid, $tickets, $price, $refid)  {    $account = get_settings('pp_account');    $username = str_replace(array('"', "'", ';'), '', $username);    $email = str_replace(array('"', "'", ';'), '', $email);    $refid = str_replace(array('"', "'", ';'), '', $refid);    $tickets = ereg_replace("[^0-9]", '', $tickets);?>">">">">">">"><?php  }  function moneybookers_form($username, $email, $rid, $tickets, $price, $refid)  {    $account = get_settings('mb_account');    $username = str_replace(array('"', "'", ';'), '', $username);    $email = str_replace(array('"', "'", ';'), '', $email);    $refid = str_replace(array('"', "'", ';'), '', $refid);    $tickets = ereg_replace("[^0-9]", '', $tickets);?>">">">">">">">">">">">"><?php  }  function stormpay_form($username, $email, $rid, $tickets, $price, $refid)  {    $account = get_settings('sp_account');    $username = str_replace(array('"', "'", ';'), '', $username);    $email = str_replace(array('"', "'", ';'), '', $email);    $refid = str_replace(array('"', "'", ';'), '', $refid);    $tickets = ereg_replace("[^0-9]", '', $tickets);?>">">">">">"><?php  }  function egold_form($username, $email, $rid, $tickets, $price, $refid)  {    $account = get_settings('egold');    $username = str_replace(array('"', "'", ';'), '', $username);    $email = str_replace(array('"', "'", ';'), '', $email);    $refid = str_replace(array('"', "'", ';'), '', $refid);    $tickets = ereg_replace("[^0-9]", '', $tickets);?>">">">">">">">">">">"><?php  }  function intgold_form($username, $email, $rid, $tickets, $price, $refid)  {    $account = get_settings('intgold');    $username = str_replace(array('"', "'", ';'), '', $username);    $email = str_replace(array('"', "'", ';'), '', $email);    $refid = str_replace(array('"', "'", ';'), '', $refid);    $tickets = ereg_replace("[^0-9]", '', $tickets);?>">">">">">">">">"><?php  }?>
```
Sry didn't know how to do that!

I uploaded a copy for download if it's easier

http://www.louisseize.com/main.rar


----------



## jleigh (Nov 1, 2002)

I just can't win today nothing seems to be working the way i need it to.


----------



## Sequal7 (Apr 15, 2001)

Try chagning the $rid value to $tid in line 136 and see what happens. Dont know if ti will work or not, there seems to be some values missing.

$user isn't shown anywhere else so I am thinking this should be $username but I am not positive.


----------



## jleigh (Nov 1, 2002)

Warning: Missing argument 4 for generateticket() in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 136

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 140

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 151

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 40


----------



## Sequal7 (Apr 15, 2001)

Ok, change it back and change $user to $username and try it again.


----------



## jleigh (Nov 1, 2002)

Warning: Missing argument 4 for generateticket() in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 136


----------



## Sequal7 (Apr 15, 2001)

Ok,last test...
replace it with this;

```
function generateticket($user, $rid, $howmany, $member)
```


----------



## jleigh (Nov 1, 2002)

well that did something just don't think its a good thing
LOL

Parse error: syntax error, unexpected '{' in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 137


----------



## Sequal7 (Apr 15, 2001)

Move that { in 137 into line 136 and try it. If it does not work I will look some more.


----------



## jleigh (Nov 1, 2002)

That brought us back to the original error


----------



## Sequal7 (Apr 15, 2001)

I think it is the $rid and $member values are not quoted...
replace line 146

```
$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values($rid,'$user',$tid,'$member')";
```
with this;

```
$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member) VALUES('$rid','$user','$tid','$member')";
```


----------



## jleigh (Nov 1, 2002)

Still same error


----------



## Sequal7 (Apr 15, 2001)

Ok, lets rule out the $howmany value, replace line 136

```
function generateticket($user,$rid,$howmany,$member)
```
with this;

```
function generateticket($user, $rid, $member)
```
 and make sure that the { is on line 137

Try it again, if you get the Parse error: syntax error, unexpected '{' in /home/louissei/public_html/scripts/plugins/raffle/main.php on line 137 place it into line 136 and try again.

Where did you get this script from, maybe they have the answer as well?


----------



## Sequal7 (Apr 15, 2001)

Sorry, but I am signing out for tonight, hope it works for you and I will check back tomorrow (there are a lot of geniuses that surf here so your in good hands none the less)


----------



## jleigh (Nov 1, 2002)

The person who wrote the script apparently fell off the face of the earth LOL

The error messages are gone but it's not saving the purchased tickets. Always says 0 tickets purchased.


----------



## MMJ (Oct 15, 2006)

This function is being called somewhere and the 4th argument isn't being passed.

Please post all the pages of this script.


----------



## jleigh (Nov 1, 2002)

http://www.louisseize.com/raffle.rar


----------



## Sequal7 (Apr 15, 2001)

MMJ said:


> This function is being called somewhere and the 4th argument isn't being passed.


That is the problem here, the function isn't being called, it is undefined and creating an error.

It needs to be defined. The page has no includes or requires so it can't be located elsewhere and that is the confusion that I have with this....

May need to create the function for this person, but where? or maybe the mySQL database does not have a filed for the $howmany field.

Change 136 back to;

```
function generateticket($user, $rid, $howmany, $member)
```
and then place this into the 146 line, it will at least define the *$howmany* value;

```
$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values('$rid','$user','$howmany','$member')";
```
 and see what happens.


----------



## MMJ (Oct 15, 2006)

Sequal7 said:


> That is the problem here, the function isn't being called, it is undefined and creating an error.
> 
> It needs to be defined. The page has no includes or requires so it can't be located elsewhere and that is the confusion that I have with this....
> 
> May need to create the function for this person, but where? or maybe the mySQL database does not have a filed for the $howmany field.


No, no, the error is because of not passing all the required arguments for the function. Test case:


```
function test($a, $b){
	return $a.$b;
}
test('a');
```
Try this test case; you should receive a similar error.

@OP: Hmm... Very strange. The function only seems to be called once in that same file (main.php) and all arguments are passed.

Something you can try though is replacing line 237 of file main.php from


```
generateticket($user_id, $rid, $tickets, ($username === false ? 'no' : 'yes'));
```
to


```
$member = $username === false ? 'no' : 'yes';
generateticket($user_id, $rid, $tickets, $member);
```
Make sure you are working on the original main.php


----------



## Sequal7 (Apr 15, 2001)

MMJ said:


> @OP: Hmm... Very strange. The function only seems to be called once in that same file (main.php) and all arguments are passed.


That is what I am saying, there is no refernce, or value for the *$howmany,* which is strange, that is the error I think.


----------



## jleigh (Nov 1, 2002)

you're right there's no field for howmany

can you tell me what the type, null etc should be and i can add it in


----------



## Sequal7 (Apr 15, 2001)

Try MMJ's fix first.....Then try my post in #22 and then post back your results for each.

*EDIT *It is important to try each as something may fix it, we dont want to skip past anything. Remember, each test will have to be employed onthe original file, so the rest of the file remains intact. *END EDIT*


----------



## jleigh (Nov 1, 2002)

Still seeing the same missing argument error after both


----------



## jleigh (Nov 1, 2002)

you guys must be very patient people LOL i'm over here pulling my hair out!


----------



## Sequal7 (Apr 15, 2001)

Ok, so if we remove the $howmany from line 136 it works, but says says 0 tickets purchased.

MMJ, we need to edit this function

```
function generateticket($user,$rid,$howmany,$member)
	{
		$sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid";
		$a = mysql_query($sql);
		$info = mysql_fetch_row($a);
		$tid = $info[0];

		for($i=1;$i<=$howmany;$i++)
		{
			$tid+=1;
			$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values($rid,'$user',$howmany,'$member')";
			mysql_query($sql);
		}

		$row=get_a_raffle($rid);
		$info = mysql_fetch_row($row);
		$totalticket = $info[4];
		$status = $info[9];
		$sold = how_many_sold($rid);
		if($sold>=$totalticket && $status=='on')
			$a = end_raffle($rid);
	}
```
Is this the main problem?

```
$totalticket = $info[4];
```
what do you think?


----------



## Sequal7 (Apr 15, 2001)

I just want to make sure that your only changing one thing at a time then trying the page, and if it does not work you are returning the file to it's *original* after the non working attempt, then trying the next repair...

Can you try this;
Replace from line 136 to 157 on your original backup

```
function generateticket($user,$rid,$howmany,$member)
	{
		$sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid";
		$a = mysql_query($sql);
		$info = mysql_fetch_row($a);
		$tid = $info[0];

		for($i=1;$i<=$howmany;$i++)
		{
			$tid+=1;
			$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values($rid,'$user',$tid,'$member')";
			mysql_query($sql);
		}

		$row=get_a_raffle($rid);
		$info = mysql_fetch_row($row);
		$totalticket = $info[4];
		$status = $info[9];
		$sold = how_many_sold($rid);
		if($sold>=$totalticket && $status=='on')
			$a = end_raffle($rid);
	}
```
*with this*

```
function generateticket($user, $rid, $howmany, $member){

		$sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid";
		$a = mysql_query($sql);
		$info = mysql_fetch_row($a);
		$tid = $info[0];

		for($i=1; $i<=$howmany; $i++)
		{
			$tid+=1;
			$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	VALUES('$rid','$user','$howmany','$member')";
			mysql_query($sql);
		}

		$row=get_a_raffle($rid);
		$info = mysql_fetch_row($row);
		$howmany = $info[4];
		$status = $info[9];
		$sold = how_many_sold($rid);
		if($sold>=$howmany && $status=='on')
			$a = end_raffle($rid);
	}
```
 and try it again. If it does not work or returns another error, please post the results and restore your original file.


----------



## jleigh (Nov 1, 2002)

Here's the database tables and fields for you just in case it's helpful:

raffle_buyers
rafid
uid
username
email
pay_type
pay_account
raffle_info
rafid
rafstartdate
rafenddate
prize
totalticket
tickettype
ticketprice
emailmsg
winnername
winningticket
commission
comm_type
payments
status
raffle_payments
transid
amount
system
raffle_settings
name
value
raffle_tickets
rafid
username
member
ticketid


----------



## jleigh (Nov 1, 2002)

yeah i have the original i keep overwriting with each time

still getting the same error


----------



## jleigh (Nov 1, 2002)

still missing argument error


----------



## Sequal7 (Apr 15, 2001)

This is the original...

```
function generateticket($user,$rid,$howmany,$member)
	{
		$sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid";
		$a = mysql_query($sql);
		$info = mysql_fetch_row($a);
		$tid = $info[0];

		for($i=1;$i<=$howmany;$i++)
		{
			$tid+=1;
			$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member)	values($rid,'$user',$tid,'$member')";
			mysql_query($sql);
		}

		$row=get_a_raffle($rid);
		$info = mysql_fetch_row($row);
		$totalticket = $info[4];
		$status = $info[9];
		$sold = how_many_sold($rid);
		if($sold>=$totalticket && $status=='on')
			$a = end_raffle($rid);
	}
```
Try to replace it with this;

```
function generateticket($user, $rid, $howmany, $member){

		$sql="Select max(ticketid) from ".mysql_prefix."raffle_tickets where rafid=$rid";
		$a = mysql_query($sql);
		$info = mysql_fetch_row($a);
		$tid = $info[0];

		for($i=1;$i<=$howmany;$i++)
		{
			$tid+=1;
			$sql="Insert into ".mysql_prefix."raffle_tickets(rafid,username,ticketid,member) VALUES('$rid','$user','$tid','$member')";
			mysql_query($sql);
		}

		$row=get_a_raffle($rid);
		$info = mysql_fetch_row($row);
//		$totalticket = $info[4];
		$status = $info[9];
		$sold = how_many_sold($rid);
		if($sold>=$totalticket && $status=='on')
			$a = end_raffle($rid);
	}
```
 and let me know what error it generates.

I am at a loss somewhat, it is not easy without access to the file so I can just make changes and test it out.....


----------



## jleigh (Nov 1, 2002)

i can give you acces if you'd like. do you prefer ftp or cpanel?

same error btw


----------



## MMJ (Oct 15, 2006)

Do you have a login we could use for the site?



Sequal7 said:


> That is what I am saying, there is no refernce, or value for the *$howmany,* which is strange, that is the error I think.


I don't understand what you are trying to say.  

EDIT: something is telling me that another page is calling this function... and not passing the 4th argument


----------



## jleigh (Nov 1, 2002)

http://www.louisseize.com user: jleigh pw: power5 the raffle link is halfway down the menu on the left use the test raffle i believe its raffle number 7


----------



## jleigh (Nov 1, 2002)

sry i made a screw up there were a couple pages missing from the archive so i repackaged all the pages http://www.louisseize.com/raffle.rar


----------



## MMJ (Oct 15, 2006)

LOL, this is so sad its funny.

The problem is line 94 of raffle_details.php:


```
generateticket($user,$rid,$howmany);
```
Anybody amused?


----------



## jleigh (Nov 1, 2002)

sadly, even though most of my hair is missing now lol, I am slightly amused by that. guess i just need to add ",$member" to that eh?


----------



## jleigh (Nov 1, 2002)

new issue

if you look at http://louisseize.com/pages/raffle_archive.php the winners username is supposed to be listed and it's not i don't know who to credit with the prize LOL


----------



## MMJ (Oct 15, 2006)

jleigh said:


> sadly, even though most of my hair is missing now lol, I am slightly amused by that. guess i just need to add ",$member" to that eh?


No.

That argument is supposed to be either 'yes' or 'no', so just try both and see which one works.

So 

```
generateticket($user,$rid,$howmany, 'yes');
```
or

```
generateticket($user,$rid,$howmany, 'no');
```


----------



## jleigh (Nov 1, 2002)

it seems to be working fine now except that its not showing who the winner is


----------



## Sequal7 (Apr 15, 2001)

MMJ said:


> LOL, this is so sad its funny.
> 
> The problem is line 94 of raffle_details.php:
> 
> ...


I am amused as well,  nice to hear it is working now.

What a poorly written script.


----------



## jleigh (Nov 1, 2002)

now if i could just get it to tell me who the winner is i'd be all set


----------



## jleigh (Nov 1, 2002)

just wanted to update that i figured out why it was not showing the winners. the length field for winnersname was set at 40 and it was supposed to be 100. all is working perfectly now


----------

