Problem solved. Some of the header(location ) things are missing colons between location and the URI. *sheepish* All good, now.
(Clarification (though it's kinda moot now) I meant the validation scripts return boolean, but are being tested against ints in the quoted script above.)
User Profile
Collapse
-
Okay...Apprecia te the help. I'll post what I can of the code (have to be careful, my uni is very strict on plagiarism.
This vrsion of it allows anyone through, but it's technically comparing boolean values to ints ($errors will be true or false). If I correct that (either by changing the return values to ints, or changing the if statement to boolean) it just sits with a blank page with the URL of this script.
[CODE=PHP]
...Leave a comment:
-
header redirect isn't redirecting anywhere (sometimes)...
Okay. I'm coding a login function for an online security subject at uni. It's written in PHP5, on a Solaris server; I don't have permissions to alter or even access the php.ini file, I believe.
What is supposed to happen is:
User fills in their username and password, hits 'submit'
javascript takes a timestamp, usernamd and password, calculates an md5 hash, fills in a hidden form with the username, hashvalue and timestamp,... -
Thanks for the advice (have changed to Strict). Will make an alternate CSS for IE.
Thanks.Leave a comment:
-
layered position:fixed elements broken in IE
I have a banner-and-sidebar menu that I want to remain always-accessible. So I've made them both position:fixed, and used z-index to ensure the layers work properly. Both the CSS and HTML validate, and the whole setup works exactly the way I want it to in firefox.
Link to site in question
However, in IE there are several problems; the major problem is that, instead of layering the two divs on top of each other, IE... -
-
scripts execute while in /bin, but not anywhere else
I'm teaching myself UNIX, here, and I've written a shellscript that works fine if I use it while in the /bin directory, but if I try to use it from another directory, I get 'command not found'.
echo $PATH shows me the /bin folder
find shows me that the script is actually in that folder
my .cshrc file has its PATH set to that folder
I don't know what's going wrong. I have a script that someone else wrote... -
Okay, I have the subquery working fine (yes, SchoolID is in juice, because school is in juice).....
(*tries various suggestions*)
I think you're right on the multiple columns - I swapped around the two selects, so that the outer query had "select *" and the inner had the specific stuff (thereby removing multiple columns), and now it works!
Thanks for your help!Leave a comment:
-
(too late to edit)
That should actually not have an 'as' after the subquery. I keep forgetting, but for some reason, this version of sql doens't like 'as' when aliasing.
(also, if this is an error because of stupidity on my part, feel free to show me. We haven't actually be *taught* anything more than very basic sql queries for this; we're just expected to magically pick them up by ourselves. So I don't really understand what...Leave a comment:
-
Okay - II'll have to use made-up names, though, because this is a question of an assignment, and my uni takes plagiarism REALLY seriously. (but this is my query with the names all subbed out. )
[CODE=oracle]
select name, fruitjuicename
from student LEFT OUTER JOIN
(select * from school, cafeteria, drinks
where school.cafID = cafetera.cafID AND
cafeteria.drink ID = drink.drinkID AND
drinktype = 'fruitjuice')...Leave a comment:
-
No multple threads. And it *works* no problem. But if you run it under bcheck -all, you'll find after the program has exited, there's a "block still in use" because of the function - if it's just a static variable, shoudln't it be discarded when the program ends?. Now, this is an assigment where I'll have marks deducted for "memory issues", but I can't work out a) why it does this, or b) what I can do about it....Leave a comment:
-
I've tried deallocating everything I could think of to do with it, and all i end up with is 'bad frees' ... the manpage doesn't specify anything from locatime() needs to be deallocated afterwards, either (you're not mallocing, so why would you need to free?) - though I can't get a man reference for get_zone, getsystemTZ or _localtime_r.
The call is:
...Code:char timeString[TIMESTAMP_LEN]; char *format = {"%aLeave a comment:
-
Left Outer Join with subqueries?
I need to use a left outer join to get all of one table, and match it to specific instances of another table. Eg, report all of A, and where A has made a specific kind of B, report the name of that B.
Now, to get the specific B, I need to join three other relations together, and then do a string match. That's easy. I can report the subset of A that has made specific kind of B. I can report all of A. I can report all of A that has made... -
memory leak with localtime()?
I have a program that's simulating a POS system, and it writes every sale to a sales log, along with the timestamp. To get the timestamp, I'm passing a time_t struct through localtime(), and passing that through strftime.
However, when i run my program thorugh bcheck, I get:
---------
Blocks in use report (blocks in use: 1 total size 10428 bytes)
Allocation Call Stack:
get_zone < getsystemTZ < _localtime_r... -
Ah-hah! That is indeed why the testing code won't print. Completely forgot about the newline thing with stdout. (Aaaand the problem exists within the while loop, which is indeed infinite. Oh joy.)
Problem solved - thanks for your help!...Leave a comment:
-
Code from start of the function to several lines after the start of the while loop. Yes, I realise the while loop isn't closed; neither is the function, but it's a long loop, and also part of an assignment, so I'd rather not post the whole while loop unless necessary. (My uni has strict plaguarism rules).
...Code:void reportSales(GJCType *menu) { float smallItemSales; float medItemSales; float largeItemSales;Leave a comment:
-
-
program hangs after printf() with literal string
Hi,
It appears my program can't get past a particular printf() statement.
Code excerpt:
[...]
printf("Sales Report\n--------------");
printf("Testing code - pre loop entry");
while(category != null)
{
printf("Testing code - in-loop");
[...]
(Ignore the category thing, that's just the start of a linkedlist search) The... -
This is incorrect - C does not necessarily 'read' from left-to-right when evaluating. It will obey typical order-of-operations rules, but if two operations have equal precedence, it may evaluate either one first depending on which it thinks is more efficient to do first at the time.
Thus any evaluation that depends solely on left-to-right calculation will be undefined....Leave a comment:
No activity results to display
Show More
Leave a comment: