Is there any other way? I can't get to figure out how for loop works.tasairis wrote: Use a for loop.
Search found 54 matches
- Thu Sep 16, 2010 4:08 am
- Forum: PHP - Code
- Topic: Loop x number of times
- Replies: 5
- Views: 455
Re: Loop x number of times
- Thu Sep 16, 2010 3:56 am
- Forum: PHP - Code
- Topic: Loop x number of times
- Replies: 5
- Views: 455
Loop x number of times
Okay, so how do I loop something (eg get top10 id's from db ordered by ascending) for lets say 10 times?
- Mon Sep 13, 2010 4:53 am
- Forum: PHP - Code
- Topic: $_POST not working
- Replies: 3
- Views: 212
Re: $_POST not working
It's allright, just make sure you have a field with attribute name="price" on the page where's form located.
- Thu Sep 09, 2010 9:03 am
- Forum: PHP - Code
- Topic: mouseover on link
- Replies: 7
- Views: 450
- Sun Sep 05, 2010 3:38 pm
- Forum: PHP - Code
- Topic: Get string from other website
- Replies: 4
- Views: 387
Re: Get string from other website
On the page you gave, the html around the dribble skill is this: <div class="">Dribbling</div></td> <td width="5%"> </td><td align="right"> </td><td align="center" width="5%"><div class="skill_text"><div class="skill...
- Sun Sep 05, 2010 5:29 am
- Forum: PHP - Code
- Topic: Get string from other website
- Replies: 4
- Views: 387
Re: Get string from other website
Unless they have an API, you'd have to do something called scraping. Scraping requires you to get the contents of that page with cURL or file_get_contents() (the latter is easier), and grab the part you want with the DOM or Regex (again, the latter is probably better overall). The only problem is, ...
- Sat Sep 04, 2010 6:10 pm
- Forum: PHP - Code
- Topic: MD5 Hashing
- Replies: 5
- Views: 580
Re: MD5 Hashing
$pass1 = sha($pass1);ScottCFR wrote:So i would use..
$pass1 = sha(pass)
- Sat Sep 04, 2010 5:37 pm
- Forum: PHP - Code
- Topic: Get string from other website
- Replies: 4
- Views: 387
Get string from other website
I'd like to know if it's possible to make strings generated on other websites appear on mine website as a string, I mean I'd echo 'em. For example: http://www.footstar.org/ver_jogador.asp?jog_id=44797 I'd like to have dribbling skill and number to appear on my website as "Dribbling: 20" is...
- Sat Sep 04, 2010 5:32 am
- Forum: PHP - Code
- Topic: Print out parts of a URL, then enter it in a form field
- Replies: 18
- Views: 2840
Re: Print out parts of a URL, then enter it in a form field
Now that I got the number printed, how would I pass that number through a form? The form code would go something like this: <form method="post" action="my-form-script.php"> <input name="number" id="number" "type="text"> </form> but how would I ...
- Fri Sep 03, 2010 6:47 pm
- Forum: PHP - Code
- Topic: Need help at php+mysql highscores
- Replies: 10
- Views: 9493
Re: Need help at php+mysql highscores
Uhm, right. Guess that would do the trick. I know that you know that that is what you want already, I was just putting it up as an opportunity for somebody that's better at SQL to do it. I put it in the challenge index Thanks. @tonchilly list all your tables and all columns in those tables. I have ...
- Fri Sep 03, 2010 5:51 pm
- Forum: PHP - Code
- Topic: Need help at php+mysql highscores
- Replies: 10
- Views: 9493
Re: Need help at php+mysql highscores
When you submit the actual results of the game, run a script that compares all guesses for that game to the actual results of that game, and updates that user's points if he's correct. I'm no SQL pro, but I'll wager that somebody here could do that in one SQL command. Uhm, right. Guess that would d...
- Fri Sep 03, 2010 4:41 pm
- Forum: PHP - Code
- Topic: Using PHP to concatenate string values entered into a form
- Replies: 5
- Views: 2042
Re: Using PHP to concatenate string values entered into a fo
Brilliant, that works perfectly. Thanks for getting back to me so quickly! Quick question though, what if I wanted to run the PHP script from a different file, rather than having to include my code at the top? Also, are there any security issues with implementing the task this way, for example, cou...
- Fri Sep 03, 2010 4:36 pm
- Forum: PHP - Code
- Topic: Need help at php+mysql highscores
- Replies: 10
- Views: 9493
Re: Need help at php+mysql highscores
So, basically, the highscore function/script/php page has to check on every load for every user game he tried to guess, and give the amount of points he "deserves"? Wouldn't that be too much for the server to handle? Because I'd like to have a highscore list on my index page, so basically...
- Fri Sep 03, 2010 9:44 am
- Forum: PHP - Code
- Topic: Need help at php+mysql highscores
- Replies: 10
- Views: 9493
Re: Need help at php+mysql highscores
Bump.
Cmon, I really need a hand on this.
Cmon, I really need a hand on this.
- Fri Sep 03, 2010 9:24 am
- Forum: PHP - Code
- Topic: Using PHP to concatenate string values entered into a form
- Replies: 5
- Views: 2042
Re: Using PHP to concatenate string values entered into a fo
Hello Danberz, think this might help <?php $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; echo "$firstname $lastname"; ?> <html> <form method="post" action="<?php echo $PHP_SELF;?>"> First Name:<input type="text" size="12" maxlengt...