You can get URL value's with [INLINECODE]$_GET[][/INLINECODE] array, in your sample URL (
[url]http://somesite.com/readarticle.php?name=sample.txt[/url]) it would be [INLINECODE]$_GET['name'];[/INLINECODE]. Be warned to use this cause this brings potential security leeks with it. you should read up on the problems with it.
[code]<?php
$file = $_GET['name'];
$f = fopen($file, r);
while ( $line = fgets($f, 1000) ) {
print $line;
}
?>[/code]now if I go to readarticle.php?name=readarticle.php I can see the PHP source.
Good luck with your site.

I guess your problem must lay in the form your using. To did you made a little typo:[inlinecode]if($budget == "low"){ $sream = $stream + 3; }[/inlinecode]

if the post variable's aren't initialized will none of these statements evaluate:
[code] if($time == "deadline"){ $custom = $custom + 1; }
if($time == "nodeadline"){ $stream = $stream + 1; }

        if($budget == "low"){ $sream = $stream + 3; }

        if($visual == "impressive"){ $custom = $custom + 2; }

        if($update == "easyupdate"){ $easyup = $easyup + 1; }
        if($update == "noupdate"){ $selfup = $selfup + 1; }
        if($update == "updateservice"){ $upserve = $upserve + 1; }[/code]

Leaving [inlinecode] $custom, $stream, $easyup, $selfup, $upserve[/inlinecode] zero (their value stays zero). Which will respond by none of your if statements evaluating to true:
[code] if($custom < $stream){$report = "streamlined is better for you than custom";}
if($custom > $stream){$report = "custom is better for you than streamlined";}
if($easyup < $upserve){$report2 = "you need our update service with your site";}
if($easyup > $upserve){$report2 = "you need our user-friendly update service with your site";}
if($selfup > $upserve){$report = "you do not need any of our update services";}
if($selfup > $easyup){$report = "you need our update service with your site";} [/code]
Which leaves $report (and $report2, which you don't output) a blank string.
So I think your problem lays in your form. you might want to add to help you debugging:
[code]echo "<pre>";
print_r($_POST);
echo "</pre>";[/code]

Hope this helps

Yes, the server can't see the difference between two requests from different windows (different browsers is another story, you got to have the session cookie for it to work)

If I correctly understand what you say would that be:
[code]
int temp = system("last");
mystream << temp;
cout << temp;[/code]

Try pressing shift + control, that works for me. I think it's some sort of shortcut to changing the keyboard.

Congratulations and happy modding!

I think you skip the next cin because you still have the enter pressed.

try putting [inlinecode]cin.ignore();[/inlinecode] in front of it.

[b]Edit[/b]: Do you to want answer on the questions in the code?

Hello, this is the wrong forum for support questions. You should post your question's regarding C in the C/C++. That is : Software Development -> C/C++.

And regarding you question, it's not entirely clear. How are you suppose to find out what the data is? Just guess?

The following is C++ code, but I guess you only need to change the cout statement:
[code]
//do headers yourself :P

int hour, salary;
if (hour < 41) {salary = hour 10;}
if (hour > 40 && hour < 71){salary = 40
10 + (hour - 40) (1.5 10);}
if (hour > 70){salary = 40 10 + 30 (1.5 10) + (hour - 70) 20;}
[/code]
Take this as example and you will be able to figger the rest out.

I would try something like:
[code]int highest = array[0];
for(int a = 0; a < 10; ++a)
{
if(array[a] > highest){highest = array[a];}
}
[/code] Just take the first element and store it as highest, then walk through the array and if the current element is higher then the variable highest store that value in highest.

[B]Edit[/B]: Just read your post clearly, sorry. Thought you were looking for only the highest

Hello Anais,
this is the wrong forum to ask questions, you should ask them next time in the appropiate forum (in this case, web development -> php(I think)).

To get back to your question, most forum software like [url=www.phpbb.com]phpbb[/url] has solid login scripts, but you would have to isolate them from the rest of the forum.

My friend once found an good login system, I think it was [url=http://evolt.org/node/60384]this[/url].

Hope it helped, bye.

I have not looked into your code (I'm to lazy) and I can't poker either. I think you can do it by making an buffer array (where you store the cards in) of 4 elements and an second boolean array to of 4 elements[code]int buffer[4]; bool array[4];[/code]Find out what combination of cards you need for an flash, let's say that that is card 1,2,3 and 4. I store those in my second array.
[code]
array[0] = 1;
array[1] = 2;
array[3] = 3;
array[4] = 4;
[/code] then make an function to check wether the entered card (in the function) exists in the array array.
[code]
bool checker(int card)
{
for(int a = 0; a < 4; a++)
if(card == array[a]){array[a] = 0; return true;}
return false;
}
[/code]then just check your buffer array
[code]
for(int a = 0; a < 4; a++)
{
if(!checker(buffer[a]))
//not a flush
}
[/code]Hope I didn't gave away to much but I really suck at giving hints :/
I didn't tested this code, it's up to you to debug it. I hope you get what I'm trying to explain.

It could be that you step over it because you still have the enter pressed from the first question. try doing something like:
[code]while(kbhit()){}[/code] to wait for it to unpress enter (this function might require the header conio.h, but I'm not sure :P). At least make some code to give you time to release enter after the first question(sometimes might adding another cin.get(); work)

[quote=hay_man;253174]unfortunately, passing in one parameter is a precondition given to me by my lecturer. I too was puzzled by this.[/quote]
Try using an global variable instead of passing one
for example:
[code]include <iostream>;

using namespace std;

int global;

void show()
{
cout << "The value is: " << global << endl;
}

int main()
{
global = 10;
show();
global = 988;
show()
}
[/code]

I haven't tested this, but you should get the idea.

Please to post [inlinecode]bufferclass::get_number()[/inlinecode]
Helping you without it is really hard. Even if you know for sure it works, helping you is way easier with it.

Dave answered your question, and you may assume you learned what he said on school/course before they give you such an assignment. You missed a lot of semicolons and data types, you might want to go over the basics again, you need to understand those before trying to do something.

Another tip:[inlinecode] mainCourse = MEAT + "with" + VEGGIE + "and" // 9+ STARCH; // 10[/inlinecode]
Replace that with:[inlinecode] mainCourse = MEAT + " with " + VEGGIE + " and " + STARCH; // 10[/inlinecode]

spaces are important!