Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Double Submit


I have a bank feature, players can add and withdraw money ect ect. What it seems people are doing is quickly when the server is under a load to add their money to it and buy something at the same time. So the money goes in the bank while they get the item they bought as well.

Is there anyway you guys can think of to stop people from submitting 2 forms at the same time?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Submit Form Without Clicking Submit Button
I was wondering if it is possible to use something like Javascript to make it so you don't have to click the submit button on a form to make it submit, while using php and mysql. e.g. Code:

Submit A Form Without The Submit Button
Is there a way to submit a form without the submit button?  Do I have to use the javascript - document.formname.submit();

My Submit Script Fails To Submit All
I have been working on putting together a website for a virtual airline and one of the features I tried to get in my website is a register page in which users enter info into fields and then hit submit to e-mail the info to my e-mail address. Code:

How To Submit A Form Without A Submit Button
how i can submit a form without using a submit button, i have to use this in one of my ongoing project.

Bypassing "submit" Or Auto Submit With Forms Data
In a regular HTML screen where you have inputs within a FORM, you usually have a SUBMIT input tag to submit the form data to the action'ed item in the form tag.

In alot of sites, I see that you can enter a field, then to its immediate right, is a GO button to submit the choice. Has anyone had experience with this, and if so, how would you code that in PHP? I have also seen where you can choose something from a dialog box, and as soon as its chosen, the form data is submitted. Is that possible in PHP also?

Md5 Has For Double Opt-in: Missing Something ?
I have made a script to register contacts in a database with the double
opt-in system.

Anyway, when looking for some examples, I have found the following
script which uses a md5 hash code to append on the confirm url sent by
email to the registering user.I tried it but with no results. Don't you think is it missing anything?How could it work without storing the hash code for the user in andatabase? To confirm a registration I think the script should look if the access key matches the one it already knows, shouldn't it?

Anyway I have no problem to insert into the database the hash code ,
it's just I want to know if I am right to believe the following script
was wrong .

here's the code..

Double Dot Means What ::
I'm still exploring in PHP programming with little knowledge on C ..
the mother of programming language..

Just wonder .. some times we will see some pepole use :: singn in
their code
and what it mean ?

for e.g Get::message ; <-- what the :: means.. is it some conditional
statement
because i saw a lot in Pear stlyle of coding..

OCI - Double Results?
to work with the example for OCI... and the $row returns 2
values, the same twice, but my query only have one... code below.

$query = 'select distinct(something) from a.b'

$stid = oci_parse($connX, $query);
if (!$stid) {
$e = oci_error($connX);
print htmlentities($e['message']);
exit;
}

$r = oci_execute($stid, OCI_DEFAULT);
if (!$r) {
$e = oci_error($stid);
echo htmlentities($e['message']);
exit;
}

print '<table border="1">'
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS))
{

print '<tr>'
print "<td>".(count($row))."</td>";
foreach ($row as $item) {
print '<td>'.$item.'</td>'
}
print '</tr>'
}
print '</table>'

oci_close($connX);

Double Insert Values ?
Why the code below will insert more than one time for each value?
because it is a check box so i need to use array to make it insert more than one value into the table but not more times for each value. PHP Code:

Using Double Quotes In CSV Files?
I've got a CSV file in which I need to use double quotes and import into MySQL.
However, I've tried using a in front of each quote. I've tried using the HTML code. They doesn't work (and it's not something I want to mess with during data entry).

The HTML code gives a parse error.

Pg_query() And Double Quotes
I'm discovering that my pg_query isn't working because PostgreSQL is
wanting double quotes around my column names and table names. Is there
a way to turn quoted identifiers off?

Double Check Of Variables.
In some examples of a PHP implementation I saw the following:
if ( isset(x) and x==12)
I do not understand what for before to check whether some variable has
some value one need to check whether this variable is set. If the
second condition is true than the first one is also true, isn't?

PHP5 And Double Byte
we have to convert a quite large ISO-application (Mysql4, PHP5) to
UTF8. We found out so far that there is no collation for MySQL which
is able to sort all character sets correctly. So this has to be done.
And there might be some problems with string functions as not all
string functions have multibyte aquivalents.

In case you are an expert for unicode in combination with MYsql and
PHP or for sorting algorithmn of asian characters please drop me a
line at
luebbert-AT-globalpark-Dot-de. We are willing to pay for consultants.

Double Quotes Appear As ? On Website
I have an Excel file (which is converted to csv by a tool and then
uploaded to a MySQL database) and then php is used to display the
data on the website.

In the Excel file i have text fields which has data containing double
quotes. They end up appearing at ? question mark on the website. Any
idea how to dispaly the quotes

Should i be carefull of any other invisible characters in Excel which
can mess up the data.

Single/double Quote
why are the escaped " (double quotes) printed with the variable? PHP Code:

Single Or Double Quotes
Is there a difference between using single quotes (') and double quotes (") in php functions?

When To Use Single Or Double Quotes
I am still confused as when to use single or double quotes.

This works:

echo "<td>" . $row[0] . "</td>";

and this does not

echo "<td bgcolor="#FFFFFF"><font face="Arial" size="1">" . $row[0] .
"</font></td>";



Refresh Causes Double Post
i'm using an html form to submit comments to a database. the form is on
the same page where the comments are being displayed. if you hit
submit, your comment appears as it should, but then if you hit refresh
there is a duplicate post. how might i fix this?

Need Double Join Query Or Not?
At the moment i have this query:

SELECT number, COUNT( * ) as count ' .
FROM visit ' .
RIGHT JOIN visitHit ON ( visitHit.visitId = visit.id ) AND ( type
= "link" )
WHERE ( brochureId = 57 )
GROUP BY number
ORDER BY number

I get a list of the numbers of the links a have with the number of
times it's clicked.

Now i don't wanna know this but the URL of the link, that's in another
table (pageElement.link)

Do i need a double join query or not?

Double If Statement To Get Queries
I've made a page that collects all entries from a specific user and post them each in a seperate form on one page.. Each entry has a form that has two buttons.. both named action.. One has value update, one has value delete How can i use these vlaues best in an IF construction on the process page.. Code:

Double Quotes Issue
I have a string thats displayed from a database table, and when the database value contains a string in quotes, its not displayed in the output form. So if the value of advtitle is  - this is an advert, as "featured on tv" When displayed it shows - this is an advert, as So its missing the "featured on tv" part. Here is the code:

Escaping Single/double
I'm having trouble with single and double quote nesting; i know this is wrong, but why?

$query = "SELECT CONCAT(client_lname, ', ',client_fname) AS name FROM clients ASC WHERE client_lname = $_POST['editclient']";

What Does F Do When Surrounded By Double Quotes?
I just installed php5.2.5 on a server and I am porting over an old script. Every time there is an f surrounded by double quotes in one of the include/require paths, there is a blank space causing the include/require call to fail. What does it do and can I turn that off in the ini somehow?

Convert Double Value To Long Value
I have this issue with doubles values. When I store a long value like 1234567898999, the data is stored like 123E+10 or something like this.

I need retrieve the data like long value, like 1234567898999, but I need store it like double value.

Double Dollar Sign
I have seen this in some code - $$res - what does the double dollar sign mean?
as compared to the $res.

CURL Double Posting
I am using cURL to process NETeller payments. Everything works fine however on NETellers' end, double payments are being made. I am not sure if curl is somehow double posting or not. Has anyone experienced this issue?

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $param);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

$xml_results = curl_exec($ch);


Mysql 4.1.16 , Apache/2.0.54 and PHP5

Removing Double Quotes From A String
i tried eregi_replace(""", "", $string); without success.
can anyone help?

Double Quotes In Text Input
I accept text, add_slashes, and store it in my MySQL DB. When I display
the text, I normally strip_slashes and also strip_tags. This all works
excepts for a field with double quotes. e.g.

"My Book's Title" is very simple

When I display this field, it is totally blank. What's the solution?

Mail() Sending Double E-mails...
I have the following function setup to submit some form data to a client and to myself. It works, however it sends two copies of the e-mail to each of us.

Note that I'm using simply '' after the headers as '' was printing the headers in the body of the e-mail rather than apply the header.....

Echo Double Quote Problem
google and manual do not say much for printing double quotes in a path case.

To facilitate your reading (I don't know how to make it colorful in
newsgroup), i'd appreciate studying the code at:

http://appsrv.cse.cuhk.edu.hk/~kkleung/menu.phps

removing tr, td and using combinations of single and double quotes did not
solve the problem :(

Escape Single/double Quotes....
I haven't found a more efficient way to better escape the quote characters for the javascript right from PHP because I only get "The kid" in the javascript alert message, so I'm wondering if anyone of you know of something better than that...Code:

How To Read Double Value From Binary File By Php
I need to read value type double form my binary file.
When i use Hex Workshop software read my binary file.
i have data 8 bytes :

hex = 3131 3131 3131 3140
string = 1111111@
Float = 2.5784852e-009
Double = 17.192157

When i use php to read file by code:

$s = fread($handle , 8);
$val = hexdec(swap_hex(bin2hex($s))));

now i have float value = 2.5784852e-009 but i want Double value.
Somebody can help me please....

Preg_replace Double Quote "
I'm import .csv files that are delimited in one of the following ways.

"test","test1","test2"
or
test,test1,test2

I can get them both to explode, but I can't get the double quote " removed. Thought that preg_replace might do the trick, but I can't figure out how to get it to find the double quote and replace it with nothing. If there is a better way of fixing the problem or importing the file I'm happy to listen. Re-saving the file is not an option in this case.

Input, POST And Double Quotes
I am having problems with double quotes inside a post variable. The
code below illustrates this. If the user enters non-quoted text then
the code works OK. If "Hello" is entered then I get $some_text equal
to "Hello". What I want is the actual text that the user entered
and not the processed version.

<?php
if (isset($_POST['some_text']))
$some_text = $_POST['some_text'];
else
$some_text = "";
?>
<html><body>
<form method="POST" action="test.php">
<p>
<?php echo("Old text: " . htmlentities($some_text). "<br>"); ?>
Enter text: <input name="some_text" size="20"><br>
<input type="submit" value="Submit" name="Submit">
</p>
</form>
</body></html>

Double Spaces In Mail Messages
When I send a message using the mail command in PHP some e-mail
addresses somehow put two returns in place of one return, so this:

$message = "Test
Test2"

becomes

Test

Test2

But if I mail this:

$message = "Test
Test2"

it works the same for all e-mail addresses. Why is it doing this? I use
Red Hat Linux and Apache.

Nl2br Function And Double Spaces?
So I started using nl2br and love it. But when I convert back from
<br> to
, it produces double spaces instead of single space.

Converting
to <br>:
$emailBody=nl2br($_POST["emailBody"]);
$emailBody=str_replace("<br />", "<br>", "$emailBody");

Converting <br> to
:
$edit["emailBody"]=str_replace("<br>","
",$edit["emailBody"]);

Now what was once single new lines is now doubled.

Finding Double Array Values
for a script of mine i have language values in an array. the issue is I found that some things are the same as the other array values. now i have alot of of values in these arrays so going through every one is very tedious. so question is, is there a way to create a loop to check the array values?

Removing Double SQL Data With IMPLODE()
The code below is a simplified version of what i am doing.  I am trying to create a comma separated list of values pulled from a table in MySQL.  This is for an easy export function of some of my stored data.  I thought that I could be clever and save some typing by using the implode() function in PHP rather than using explode() and then listing every variable in a row separated by a comma. 

The good news is that it seems to have MOSTLY worked, except that now I am getting two of everything. I think it has something to do with the $row array having multiple values for each key (maybe?...i am still not comfortable with arrays). Anyway, what do i need to do to get a single list of values, separated by a comma (and kept in the order returned by the query)? Code:

Preventing Double Posts On A Form
I get how it posts a random hidden form # on each page, and if its the same as the last submitted form(kept track of via session variable), it tells you its a double post (or you can put some code in to redirect to another page).

I was also wondering how to stop pressing the submit button twice. i dont think this postBlock class catches that. My only guess is to disable the submit button, onsubmit.

Single Over Double Qoutes Really Worth It?
Is the performance of the single quote(') really better than the double quote(")? I come from a C++ background and i alway used double quotes in there(not sure way) so for one it is more natural. I also think the code looks alot cleaner, for example:

print("This is just some {$var1} random text {$var2} to show an example {$var3} of what i mean"); than

print('This is just some' . $var1 . 'random text' . $var2 . 'to show an example' . $var3 . 'of what i mean');

This is just a quick example but some stuff i have seen it is just hard to see where the string stops and the variable start. I think if you script is running slow and you change all the " to ' that it will not make a big difference because soemthing else must be wrong.

Double Parsing/loading With Phplib Template
I use from "PHPlib" the template class. When I was trying to remeber, in a session, the last chosen menuitem, I stumbled upon the problem that the whole page is loaded twice.

When I traced it down, the reason was a "normal" parsing of a template into a var. wich is strange because it isn't the only parsing I do. it's the second time I parse a template of the 4 I do. As soon as I remove that specific parsing, The problem is no more.
This is the code of the piece that causes the problem: PHP Code:

Finding Double Data In Text File
I am working on this e-mail newsletter subscription thing and I am storing the data in a txt file (mySQL is better, I know but I want it to be compatible with non-mysql systems).

Off course I don't want any e-mail adresses appearing twice in my list (the list looks like this: someone@somewhere.com, blah@bla.com, et cetera). How can I prevent this?

Best To Use Single Or Double Quote For Forming Strings?
Here's something I've been wondering. Do most of you use single or
double quotes as a string encapsultor?

ex:
$s = "This is a string, I can embed ' with no prob";
vs.
$s = 'This is a string, I can embed " with no prob'

Is there an advantage or best-practice reason to choose one over the other?

Display Table Content With Double Search???
I would like to display schedules by team.  The best option I can think of to do so is to have two drop down menus.  First menu to select division, then search for specific team in the second menu.  Where do I start of this?  I have the schedule in a table with fields being: Code:

How To Strip Quotes (single And Double) From A String
I have used a class called clsMetaContent.php, as provided in the book Creating Interactive Websites with PHP and Web Services, by  Eric Rosebrock - who I understand is the lead developer of this site.

While using this class with my application - I find a problem in the assignment of the description for the description part of the meta tag.

The code in the class looks like this:

// Formulate the description for each page.
      if(empty($ptitle)){
         $description = $this->description;
      } else {
         $description = '$ptitle - $this->description";

I have found that my description can contain single and/or double quotes. Which causes a problem with the assignment of the meta tag for the description. What happens is, due to the error in the format of the meta tad description, it outputs the contents of description again on the start of my web page, instead of keeping it within the meta tag assignment.

I think I just need a function to strip out double and single quotes - but have been unable to find any.

Trouble Inserting Single/double Quotes To MySQL
I am having trouble inserting single and double quotes and commas to my mysql db. Is there a php method that I can run to prep variables before hand?

Double And Single Quoted Strings Are Handled Differently By PHP
According to zend.com

Double and single quoted strings are handled differently by PHP. Double
quoted strings are interpreted while single quoted strings are treated
exactly as written. For example:

$foo = 2;
echo "foo is $foo"; // this prints: foo is 2
echo 'foo is $foo' // this prints: foo is $foo
echo "foo is $foo"; // this prints: foo is 2 (with a new-line)
echo 'foo is $foo' // this prints: foo is $foo

I can not get this to work.

Double Quoted Values From Database Won't Show Up In Form
I enter user input from a form into a mysql database using addslashes. When I access values with a double quote from the database they won't show up in a text form field as the default value. I use stripslashes when accessing database values, magic_quotes_gpc is on, magic_quotes_runtime is off, magic_quotes_sybase is off.

Double Input Of Form Data When Browser Is Refreshed
I have a form page. When submitted it posts to page2.  On page 2, it inserts variable into the database. The queries the database and displays the information. But....

If the viewer refreshes their browser, it now submits the information into the database again.

Not sure how to handle problem. I think that if a session variable passed to page 2 in an if else statemen, it will keep this from happening when refreshed since the session variable is not passed in the refresh. 


Copyright © 2005-08 www.BigResource.com, All rights reserved