Welcome! Log In Create A New Profile

Advanced

Topic 2B

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar
Mac
Re: How do I validate an e-mail address
March 06, 2006 05:18PM
Order an email address using your prescribed book which you can purchase from us @ R1 000 000,00. Cash only.
Re: Topic 2B
March 08, 2006 11:19PM
The rest of it is done but:

<?php
// try1
<input type="text" name="in_str">;

// try2
echo "<input type="text" name="in_str>";
?>

i get errors with both try1 and try2. I see why try1 does not work but I cant figure out why try2 does not work.

I thought echo throws back to html but I get some error about the < character.

what am I doing wrong?
I try to keep away from html as much as possible (personal belief - languages should not be mixed and matched in the same file).


Murphy's Technology Law 7
-- The attention span of a computer
is only as long as its electrical cord.
Re: Topic 2B
March 09, 2006 12:01AM
All done all workin.

avatar
Mac
Re: Topic 2B
March 09, 2006 07:44AM
echo "<input type="text" name="in_str>";

no closing "
i.e. name="in_str

Also, you can't use " here without escaping it
ie echo "<input type=\"text\" name=\"in_str\">";

You can use
echo "<input type='text' name='in_str'>"; or even
echo "<input type=text name=in_str>"; but the last is not good programming practice.

So, clearly at some stage you will find out that you will mix languages since you will grow tired of escaping the "s. Most editors generate forms quickly, thus addings escapes \ is tedious. Never say never!
Re: Topic 2B
March 09, 2006 09:43PM
Sorry Mac.

I meant:
echo "<input type="text" name="in_str">";
for try2 but I get:
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /var/www/localhost/htdocs/flow_array.php on line 11

This one fixed it though:
echo "<input type='text' name='in_str'>";

Thanks for the help.
You are the Mac



Murphy's Technology Law 7
-- The attention span of a computer
is only as long as its electrical cord.
avatar
Mac
Re: Topic 2B
March 09, 2006 10:33PM
No. TheOnlyMac smile
Re: Topic 2B
March 10, 2006 12:28AM
Topic Complete
Re: Topic 2B
March 10, 2006 11:05AM
Ok ok, the last 2 weeks of work have been HELL and I've fallen a little behind (work from 7am to 9pm and then fall asleep). This weekend I've said NO to work, so I am hoping to sit down and concentrate on my PHP work. I could simply post - "All done", but. That would irk me, and be a lie! O noes!

Just wanted to give an update. I haven't given up - I'm just slow!

smiling smiley
Re: Topic 2B
March 12, 2006 08:47PM
2B Completed.
Re: Topic 2B
March 13, 2006 10:26AM
Topic 2B - done! No problems here..
Sorry, you do not have permission to post/reply in this forum.