I have written a piece of code that is to make a forum which contains a table consiting of two colums and a determind number of rows with a while loop, however when I test the page it goes and goes, and then returns an error stating that the maximum 30 second limit has been reached, I understand what that means I just don't know why it's looping forever:
Have you specified an initial value for $weightnum anywhere? Cos if you haven't, your counter doesn't know what it's s'posed to be counting down from. I would've thought it'd be easier to count up, but I don't s'pose it really matters.
Yeah it pulls it from a forum page, I guess I could check to make sure I spelled it right. I also have a habbit of using the $ in my form variables, could check.
Yeah, I've had the same problem. I've only recently been playing around with PHP - before that it was all ASP - and I'm always getting caught out by missing ; and { which are a lot harder to spot than a missing then or end if.
I have written a piece of code that is to make a forum which contains a table consiting of two colums and a determind number of rows with a while loop, however when I test the page it goes and goes, and then returns an error stating that the maximum 30 second limit has been reached, I understand what that means I just don't know why it's looping forever:
The reason HTML is easier is because it's not a real language. HTML is markup: that means it tells stuff what to look like. It's not considered a language because there are no variables or conditionals or stuff like that.
The reason HTML is easier is because it's not a real language. HTML is markup: that means it tells stuff what to look like. It's not considered a language because there are no variables or conditionals or stuff like that.
Yeah I know, that's why I wanted to learn an actual rograming language. Hence PHP
Hi all ive got a small and simple (for the moment atleast /unsure.gif"
style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> )file and directory
listing script in php as follows CODE $dir = "."; $num = 0; $file = scandir($dir); while($file
= scandir($dir)){ echo $file ; echo " "; $num = $num + 1; }; the concept is
simple enough, the directory to start with is the current one, so scan this directory and while we
have a result do a loop to echo the file/directories found, incriment the array number by one so we
get the....
i'd like to make for loop which dependes on a $_GET variable: here is my tries: CODE if
(isset($_GET ) { switch($_GET ) { case 'asc': $exp1 = "$x>0"; $exp2 =
"$x=$total"; $condition = '$x++'; break; case
'desc'; $exp1 = "$x=$total"; $exp2 = "$x>0"; $condition = '$x--';
break; } } then CODE for($exp1; $exp2; $condition) { //** do something
**// } that is what i want to do, sure this code is wrong so what is the valid code?!!....
I have a page where I list a number of records from my db. Under each record I have a checkbox and a
text field. At the bottom of the list I have a submit button. I want to be able to check various
boxes and edit the text field then click the button to update all of the records. I currenlty have
the following and it updates the records ok (checkbox, I haven't messed with the text field yet)
when I first check the boxes but it will not update the db when I uncheck the boxes. My form: PHP
Code: CODE if(isset($_POST )); $active1=serialize($_POST );....
In ASP you'd do this: CODE For Each Field in Request.Form So how do you do it in PHP? I
want to loop through a form, check to see if it has a value and if so, append to a string to send as
the body of my email.....