![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,117
|
![]() Is it possible to take a forms submit button and code it so that it acts like a url.
I do not think and 'onclick' element will actually work for what I need :/ I want to avoid using the form itself but still need it (data collection) and wanted to simply add a meta refresh to a page as if the button was clicked. Nothing nefarious, just want the form to still count submit clicks in the database, without having to have the surfer click the submit button. This is the form I'm using presently: Quote:
__________________
NOTHING TO SEE HERE |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
If the surfer isn't clicking submit then what submit clicks are you counting?
__________________
__________________ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Feb 2015
Location: Amsterdam
Posts: 208
|
Maybe something like:
Give the form a name, for example "form1", then Code:
window.onload = function(){ document.forms['form1'].submit(); } Code:
<body onload="document.form1.submit()"> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
So the question isn't how to turn a button into a URL (which I'm sure he's asked before) but how to make a form automatically submit on page load?
__________________
__________________ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,117
|
Quote:
Onclick wont work for this, I need to be able to change a submit button to a clickable link (the link from the previous page loads the form, but i want to bypass the form but still carry the data through to the 3rd page).
__________________
NOTHING TO SEE HERE |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
Is the 3rd page on your site?
__________________
__________________ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,224
|
Quote:
<form action="page3.php" method="post"> Message: <input type="text" name="message"> Name: <input type="text" name="name"> Email address: <input type="text" name="emailad"> <input type="submit"> </form> page3.php: <html> <body> Hello <?php echo $_POST["name"]; ?>, I see that you wrote <?php echo $_POST["message"]; ?><br> Your email address is <?php echo $_POST["emailad"]; ?> </body> </html> This carries data to another page and doesn't need it to be a clickable link
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
Quote:
Is that what you're trying to do? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,117
|
Quote:
![]() Otherwise I'll have a redirect page with a form on it that I'll have to throw ads on before going to the tagret url which will detract from the surfers site experience.
__________________
NOTHING TO SEE HERE |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,117
|
No, the third page is an external site.
__________________
NOTHING TO SEE HERE |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,224
|
I think I read something wrong lol.
But, if you want to send data on a <a href=...> then sessions would work. But, if you want to send that data to other sites, then that makes things kind of tricky, like syncing up where the sessions are stored on both sites. Also, probably will have to use a prefix for the session variables on each site so that they aren't named the same and cause issues etc.
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
Quote:
If you want to move the visitor from one page to another, while at the same time, invoking a script using the form data from the first page, you might be able to achieve that by passing the data to the next page and coding the next page to recognize the passed form data, invoking a web hit to whatever script is handling the form data. Do you have coding control of the target page, or is that a third party page? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,117
|
Quote:
Once its completed theres a very high chance you might be interested in this script too ;) Send me a PM ![]()
__________________
NOTHING TO SEE HERE |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
How about this...
Your page with the form, on submit, executes a PHP script: record_and_go.php You pass whatever data you need for saving, AND the target URL. The PHP script does whatever DB validation/update you need, and returns an tiny HTML shell that contains only a Javascript snippet that immediately sets the window location (page url) to the target page from the last form. That will cause the target page to be loaded when the JS is executed (on form load). ?? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,117
|
Quote:
![]() I'd need to add an additional .php file, but yeah, I can see that working.
__________________
NOTHING TO SEE HERE |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
Quote:
![]()
__________________
__________________ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 | |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
Quote:
As I now understand, the application is more for top list / traffic exchange tracking. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,084
|
I'm trying to understand the question, but I have no idea what OP is trying to achieve =D
Can you please describe your question step by step? There are many good answers above, but I still have no idea what you need :D You have a form, which, in this case is completely unnecessary.. You can simply use 2 links without the form itself.. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Industry Role:
Join Date: Sep 2015
Posts: 88
|
Seems like he wants to use the visitor's IP and browser, to submit a form in an external site.
First check if they have CSRF tokens, a validation that their site is not in an iFrame, CloudFront, or any other security measures. Then it may be achievable with JavaScript as well. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | ||
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
Quote:
Quote:
The only thing he has been clear about is wanting to generate clicks that people haven't made.
__________________
__________________ |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
DINO CORTEZ™
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
|
Even simpler solution.
Use a PHP script that scrapes the form data (for DB) and the target URL. When PHP updates the DB, simply return a location header from the PHP script, aimed at the target URL. |
![]() |
![]() ![]() ![]() ![]() ![]() |