Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
In this case you can just use a hidden field. page1.php </pre> <form action="subdirectory/2.php" method="POST"> $YourGayUserName = 'Burt'; echo $YourGayUserName; ?> Select User: UnSelected Gay User One Gay User Two Gay Three < 2.php Use the POST method for both vars: (You had an extra ';' here) echo $_POST['$YourGayUserName'] ." and " .$_POST['guser']; ?>
-
Make another table with 2 fields: stu_id, picture_id
-
This is a very basic concept in most languages... if (myform.taxes_cost.value == 1) { var tax1 = subTotal * 0.05; var tax2 = (subTotal+parseFloat(tax1)) * 0.075; var tax3 = (subTotal+parseFloat(tax1)+parseFloat(tax2)) * 0.03; }
-
page1.php Click Here page2.php echo $_GET['var']; ?>
-
[SOLVED] loop inside a .txt file (migrating from sql)
Maq replied to johnwayne77's topic in PHP Coding Help
Nice, that's similar to what I said except using cURL, and just exploding the returned string rather than dumping it into a file and opening it back up. Regardless, glad to see it working -
[SOLVED] loop inside a .txt file (migrating from sql)
Maq replied to johnwayne77's topic in PHP Coding Help
That's because file_get_contents() returns a string (of the ENTIRE file), NOT an array (of EACH line), so you can't call foreach on it. You would have to do file_get_contents, put it in a txt file on your server, then call file() on that txt file. -
For those of you who don't know: Click here to find out.
-
I didn't know either corbin... I'm gonna start using that more often
-
[SOLVED] loop inside a .txt file (migrating from sql)
Maq replied to johnwayne77's topic in PHP Coding Help
Is there a problem? You should be able to call the script in the command line with: shell_exec("php script_name.php &"); (The '&' is to run in the background, you can remove it if you want) The txt file is probably behind a folder you can't access... I have a script at home I use, but I'm not sure off hand, sorry. -
[SOLVED] loop inside a .txt file (migrating from sql)
Maq replied to johnwayne77's topic in PHP Coding Help
Not tested but every 10 emails it should wait 10 seconds. $delay_time = 10; $delay_emails = 10; $lines = file('email.txt'); foreach ($lines as $line_num => $email) { if($line_num % $delay_emails == 0) sleep($delay_time); echo "email# $line_num: " . $email . " "; //your mail function } ?> -
[SOLVED] loop inside a .txt file (migrating from sql)
Maq replied to johnwayne77's topic in PHP Coding Help
Does your txt file already have the emails? If the contents are in the .txt file and separate by newlines then you can use the file() function: $lines = file('email.txt'); foreach ($lines as $line_num => $email) { echo "email# $line_num: " . $email . " "; //your mail function } ?> -
Quit hijacking other people's thread, and if you really want to do something about a double post then click on the "report to moderator link", don't bitch about it inside the thread... As far as the site, even though pointless, it's pretty cool. I didn't find any major security holes, although I'm not a security expert. One suggestion, maybe you should check the link to ensure it's a valid link before allowing someone to submit it.
-
I don't know why I thought he was on a Mac, must be another post or something, my mistake.
-
Geting Data From DB and Show Each in Checked Box
Maq replied to binumathew's topic in Application Design
Extract the names from the DB and echo the row['name'] as the value of the check box and the text along side of it. Do you have any code? -
He's on Mac I believe, and if served correctly it's "/private/etc/hosts" just like most linux systems are "/etc/hosts". No extension.
-
Sorry, I didn't read your post clearly, I don't know of any, maybe go to the big name template dealers and see if they offer resell.
-
You can use a combination of cookies and sessions. Cookies would work, but the vendor can delete them if they know that's how your preventing them from spamming but sessions they can just close the browser and reopen your page to continue spamming. My suggestion would be to log their IP in a table somewhere with a timestamp, so you can count how many messages they've sent, and you could write a script and call it in the crontab every 24 hours to wipe out the ones that are over 24 hours old.
-
Sorry if I'm mean, but that's the way I explain things. We're saying you shouldn't use it for auto-increment, like the quote from the manual says, it will take 584 million years if you increment it every second. BIGINT is used in many situations, for example, phone numbers. Instead of reusing the ID for the destroyed units just have an extra field in your table called, "alive", (like what FaT3oYCG said), that's binary (1 & 0), and when it's destroyed update that field to a 0 so when you check to see which ones to re-use (destroyed) you can just say WHERE alive = 0; and that will grab all your destroyed units. Hope that helps.
-
You had some things mixed up, try: $array = array('submit-new' => 'submit-new', 'layout' => 'default', 'view' => 'article'); foreach($_POST as $key=>$val) { if(in_array($key, $array)) { echo $key . ' = ' . $val . ' ';; } else { echo 'nope'; } }
-
Maybe there is a better way but create a list of POST vars that you want to accept and do a in_array() check in the foreach loop...? I'm not sure how you're deciding what vars you want to keep, with that info there's probably a better solution.
-
You wanna see my O-face?
-
I didn't know that, is this still true?
-
Found this code snippet off the mysql website: mysqldump -l -B db1 > db1.sql mysqldump -l -B db2 > db2.sql diff db1.sql db2.sql > diff.sql Of course you can add tables in for your cause. Link, http://lists.mysql.com/mysql/190020. Hope this helps
-
What are you having trouble with...?