Jessica
-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Posts posted by Jessica
-
-
You need to:
A. Describe your desired outcome.
B. Describe the existing outcome.
C. Use code tags (the <> button)
D. Include only relevant code.
-
You wouldn't, you would use a Dom Parser. I like SimpleDOM
-
Your code has syntax errors which are obvious.
"Not working" is not a useful diagnosis.
-
Not tested.
<script type="text/javascript">
now = new Date();
hour = now.getHours();
minutes = now.getMinutes();
if ((hour >= 10 && minutes >= 30) || (hour < 5)) {
document.write('<div id="\maintenance\">content here.</div>');
}
</script> -
Or just add the existing getMinutes function...
-
For one thing, you should use && not "and".
Your code is very hard to read the way you have it, plus it's invalid HTML. Let's clean it up. You kind of have your use of quotes backwards too. In PHP "" is a interpolated string, and '' is not. Use '' when you don't have variables inside the string.
<?php $value = $row_list['parentID']; $text = $row_list['parentOneFirstName'] . ' ' . $row_list['parentOneLastName']; if(!empty($row_list['parentTwoFirstName'])){ // If the first name is empty, would the last name ever have a value? If so, add your && in here. $text .= ' & '.$row_list['parentTwoFirstName'] . ' ' . $row_list['parentTwoLastName']; } echo '<option value="' . $value . '">' . $text . '</option>';
You could make it even easier and cleaner by putting the parents names into an array when you get the info from the database, and using implode. It would look something like this.<?php $value = $row_list['parentID']; $text = implode(' & ', $row_list['parents_names']); echo '<option value="' . $value . '">' . $text . '</option>';
-
I agree, but the OP didn't make any effort to use anything we said so far, so...It looks like the OP just wants the single ID for the item to remove. I would personally use anchor tags instead of the remove buttons and the HTML form.
-
That is my code, but when I try it.. it doesn't work.
Did you even read the replies? My post explains how to do this.
-
Once again - how should we know? Is there a reason you are being so secretive?
-
Probably because 'item_name' is a string and is not at all like 'neck'
-
I see necklace.... What is the problem?
-
Yes, you are
foreach($arr AS $key => $val)
-
You know, if you made an effort to use proper English rather than chatspeak and slamming your hand against the keys, you wouldn't need to apologize for poor English.
Use the <> button.
-
Use foreach
-
Yes, JavaScript. Check out jQuery
-
Format the date in the select part. Instead of select *, specify the fields and you can format it there.
-
What?
Are you saying you have multiple inputs? Make their names an array and you can then access the array in PHP
<input type="text" name="fields[]">
And then $_POST['fields'] will have a useful array. -
I don't really learn by reading books so I can't. However there is a thread somewhere here with a list of good ones.
The PHP manual is very useful. Follow their examples, read the comments, read the manual pages about all the basics.
It would look less messy if you don't start/stop PHP all the time.
-
What did mine have that yours doesn't?
-
We can't do much without seeing your HTML and directory structure.
-
We don't do it for you here. I gave you the information you need. Make an effort.
-
... And?
-
<a href="linktopage.html#otheranchor">Link</a>
-
I misread your post. The style tags do have to be within the HTML tags.
Where did the ZCE practice exams go?
in Miscellaneous
Posted
I don't get it - you think the training is "bullocks" but you don't want the junior dev to take the test unprepared...soo....your options are...?