Jump to content

[SOLVED] Use of undefined constant void - assumed 'void'


MrCreeky

Recommended Posts

Hi,

 

Today I have started getting this error:

Notice: Use of undefined constant void - assumed 'void'

Line of code:

<?php 
  $day   = ($row_rs1_events['ddate']);     // Day of the countdown
  $month = ($row_rs1_events['mdate']);      // Month of the countdown
  $year  = ($row_rs1_events['ydate']);   // Year of the countdown
  $hour  = 24;     // Hour of the day (east coast time)
  $event = ($row_rs1_events['name']); //event

  $calculation = ((mktime ($hour,0,0,$month,$day,$year) - time(void))/3600);
  $hours = (int)$calculation;
  $days  = (int)($hours/24);
?>

 

 

and this one:

Notice: Undefined index: loginid in

Line of code:

<div class="login_div" id="login_div"><form action="index.php" method="get" enctype="multipart/form-data" name="login" class="login_form" id="login_form">
<span class="login_text">Login ID</span> <input name="loginid" type="text" size="10" /></form></div>

 

What would make that just start to happen?

 

Windows Server 2003, PHP 5.2.8

http://www.hifisquad.com/test.php

Link to comment
Share on other sites

Some sites show (void) as a optional parameter.

 

Like the manual you mean? The meaning of the word void....

 

Containing nothing; empty; vacant; not occupied; not

filled.

 

Some people need to read a manual about reading manuals. Optional arguments are surrounded by [] brackets.

 

Removing it worked but why would it have only just started to show this error on my part?

 

Maybe your error_reporting level has changed?

Link to comment
Share on other sites

And some people need to not assume...

 

http://www.w3schools.com/PHP/func_date_time.asp

 

Some sites show (void) as a optional parameter.

 

Like the manual you mean? The meaning of the word void....

 

Containing nothing; empty; vacant; not occupied; not

filled.

 

Some people need to read a manual about reading manuals. Optional arguments are surrounded by [] brackets.

 

 

Link to comment
Share on other sites

And some people need to not assume...

 

http://www.w3schools.com/PHP/func_date_time.asp

 

Some sites show (void) as a optional parameter.

 

Like the manual you mean? The meaning of the word void....

 

Containing nothing; empty; vacant; not occupied; not

filled.

 

Some people need to read a manual about reading manuals. Optional arguments are surrounded by [] brackets.

 

 

 

Thats what you get reading an unreliable source. Whoever wrote that also cannot read the manual.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.