Welcome! Log In Create A New Profile

Advanced

string.php

Posted by cosmos967 
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
string.php
August 19, 2012 06:57PM
I have a problem with the string fuctions. I tried this code but it does not work.

string.html

<html>
<head>
<title>Use of 10 string functions.</title>
</head>

<body>

The length of the string is,
<?php
echo $_REQUEST["data"];
?>
</body>
</html>
avatar
Mac
Re: string.php
August 20, 2012 06:55AM
You also have a problem reading?

- Use the formatted code button when posting code

- Do not post all your code
Re: string.php
August 23, 2012 09:35AM
Hi,

When the submit button is pressed, the form is reloaded and jumps to the top of the page.
I am unable to find a solution for PHP. There is a few solutions for html, like name anchor, AJAX, and
even with Java script. Any suggestions please?
avatar Re: string.php
August 23, 2012 01:50PM
Schalk1807
Just use the if statement like this:
Language: PHP
<?php if(condition){ echo"do something"; } else { echo "do something"; } ?>
I hope that 's going to help you.
Re: string.php
August 23, 2012 07:38PM
Thank you Nickkonge,

Even with the if...else statement, it jumps to the top of the page. The string page is quiet long, as I coded all the questions, explanations and functions separately from each other. The result is that you need to scroll down to use most of the functions. All functions has their own submit button. 2nd problem is that when using if....elseif statements, the answer only appears at the bottom of the page, not at the separate functions.

Mac,

Some guidance please. Must we use if...else statements on all pages, or is it more applicable for the portfolio. For instance the fmod code is extremely short and unless I miss the bus, it is not possible to use the if....else statement. My reason for asking is as mentioned above. If we must use the if....else statement for the string page, then I should probably recode it to have all separate function's submit buttons lined up next to each other, or is there another better way that I am not seeing?

If the if...else statement is not necessary for the string page, how can I stop the page from jumping to the top after a submit button was pushed.
avatar
Mac
Re: string.php
August 24, 2012 12:24PM
Use where you can, it is more efficient. It is difficult to suggest since I do now know your code. If you put the forms into a table, then the form should stay in the table.
Re: string.php
August 24, 2012 01:40PM
Thanx Mac
Re: string.php
August 27, 2012 05:51PM
Can somebody help!
I have installed easyphp from this site, but I have a problem of php not validating the HTML code especially when I click the send button. Otherwise every other thing works fine, like when I run PHP files.
Will I loose marks if I submit the work without the forms. After inputting information on the form and clicking the send button php either remains blank without the answer I expect or puts its own formatting marks.
Re: string.php
August 27, 2012 11:09PM
Hi,
Can you be a little bit specific? What works and what does not so I know how I might help you?
Peace
Re: submission of assignment via myunisa
August 29, 2012 02:32PM
I have since finished the assignment. My question is how do we send it via myunisa. There seems to be no specific method of how to
send the files. Do we send them as .zip files. Do we choose PHP or whatever under my unisa. I have already put my files under one
folder and named them with my student number and the assignment number. Is this the right way please help. Wish you well as you code.
It took me approximately 3 days to finish it.
avatar
Mac
Re: string.php
August 30, 2012 07:06AM
You are clearly not reading the tut letter/forum/myUnisa sad smiley. Submission is explained in detail in document available on myUnisa. Also, this post of yours does not belong here.... as explained the tut letters from last year....
Sorry, only registered users may post in this forum.

Click here to login