Hi hope someone can help. I have a website that if no value is entered then it will insert in progress. I need to add another value to this so i can change
to not scheduled . any help with this. below is my code.
if($member_start == null) {$member_start = "In Progress";}
if($member_complete == null) {$member_complete = "In Progress";}
the table it is pulling from has jobs that run in hh:mm format.
$provider_start_hh = $_POST['provider_start_hh'];
$provider_start_mm = $_POST['provider_start_mm'];
Thanks for your help
Need help with code.
Moderator: General Moderators
Re: Need help with code.
This is your first post here (welcome, by the way) so we have no idea what kind of site you have or code you're using.
Insert what? What progress? Change what to be scheduled? What jobs?
Insert what? What progress? Change what to be scheduled? What jobs?
Re: Need help with code.
sorry for not being more clear.
I am using php for a site that we input times that jobname runs and if it does not run for the day then I need it to say not scheduled. or if the job is still running then I need it to say in progress.
I have attached the output php code.
the output file will email the report with status of jobs
I am using php for a site that we input times that jobname runs and if it does not run for the day then I need it to say not scheduled. or if the job is still running then I need it to say in progress.
I have attached the output php code.
the output file will email the report with status of jobs
Re: Need help with code.
Okay, better idea of the site, but still no idea about the code. All I've got are the four lines you posted.
Brevity is not helping you. Details are good. Seriously, spend a good 5 or 10 minutes explaining what the system does, what the code looks like (posting it would be great), and what it needs to do.
All I can do is guess:
Seems like $member_start and $member_complete are arbitrary strings, but I have no idea how those variables are being used. Don't see their values in your screenshot. But I think you can add a third condition in there, depending on $member_start and $member_complete I guess (both are null?), to change the messages appropriately.
How is this code related to the other code? Is this where you determine if the job was scheduled or not? My first thought would be that you use two different input "modes" in the form:
1. Radio button for a scheduled job. Start time is required, end time is optional (and empty means "in progress"), or two more radio buttons, separate from the other two, for an end time versus "in progress".
2. Radio button for an unscheduled job.
Brevity is not helping you. Details are good. Seriously, spend a good 5 or 10 minutes explaining what the system does, what the code looks like (posting it would be great), and what it needs to do.
All I can do is guess:
Code: Select all
if($member_start == null) {$member_start = "In Progress";}
if($member_complete == null) {$member_complete = "In Progress";}Code: Select all
$provider_start_hh = $_POST['provider_start_hh'];
$provider_start_mm = $_POST['provider_start_mm'];1. Radio button for a scheduled job. Start time is required, end time is optional (and empty means "in progress"), or two more radio buttons, separate from the other two, for an end time versus "in progress".
2. Radio button for an unscheduled job.
Re: Need help with code.
thanks for your input
so I have a table that when time is entered it will add to the database.
then I run the below to grab from the database and enter the data into the table (this is my update file)
<tr>
<th colspan="2">Provider Processing(INF00539A - FAC00015A)</th>
<td>Started:</td>
<td>
<input name="provider_start_hh" maxlength="2" style="width:25px; text-align:center" value="'.$provider_start_hh.'"/> :
<input name="provider_start_mm" maxlength="2" style="width:25px; text-align:center" value="'.$provider_start_mm.'"/>
</td>
<td>Completed:</td>
<td>
<input name="provider_complete_hh" maxlength="2" style="width:25px; text-align:center" value="'.$provider_complete_hh.'"/> :
<input name="provider_complete_mm" maxlength="2" style="width:25px; text-align:center" value="'.$provider_complete_mm.'"/>
</td>
</tr>
Now I have a view that if no time has been written to the database it will plug in (in Progress) sometimes I will not have time scheduled so
I want it to say (not Scheduled)
Now I have my (view file) that will go to the database and grab the times. If there is not anything in the databse for that item then it will insert
in progress. I would like to add a value that would translate to (Not Scheduled) just like if empty it plugs in in progress.
if($tms_start == null) {$tms_start = "In Progress";}
if($tms_complete == null) {$tms_complete = "In Progress";}
so I have a table that when time is entered it will add to the database.
then I run the below to grab from the database and enter the data into the table (this is my update file)
<tr>
<th colspan="2">Provider Processing(INF00539A - FAC00015A)</th>
<td>Started:</td>
<td>
<input name="provider_start_hh" maxlength="2" style="width:25px; text-align:center" value="'.$provider_start_hh.'"/> :
<input name="provider_start_mm" maxlength="2" style="width:25px; text-align:center" value="'.$provider_start_mm.'"/>
</td>
<td>Completed:</td>
<td>
<input name="provider_complete_hh" maxlength="2" style="width:25px; text-align:center" value="'.$provider_complete_hh.'"/> :
<input name="provider_complete_mm" maxlength="2" style="width:25px; text-align:center" value="'.$provider_complete_mm.'"/>
</td>
</tr>
Now I have a view that if no time has been written to the database it will plug in (in Progress) sometimes I will not have time scheduled so
I want it to say (not Scheduled)
Now I have my (view file) that will go to the database and grab the times. If there is not anything in the databse for that item then it will insert
in progress. I would like to add a value that would translate to (Not Scheduled) just like if empty it plugs in in progress.
if($tms_start == null) {$tms_start = "In Progress";}
if($tms_complete == null) {$tms_complete = "In Progress";}