TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-08-2010, 06:31 PM   #1 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default Setting "submit"

Driving me a bit nuts this one, have tried alsorts of combination's...

At the top of my file I have

PHP Code:
if (!ISSET ($_POST['submit'])) 
which tests if the submit has been hit, if not displays the form....

What I'd like to be able to to is generate a link that would be processed directly by the php code that the form would normally be submitted to... (does that make sense ?)

so a generated link in the code looks like ..

PHP Code:
echo '<a href="index.php?submit&s_type=' $s_type '&d_height=' $d_height '&j_ref=' $j_ref '&j_name=' j_name '">' $j_ref '</a>'
The link generated looks like ..

HTML Code:
index.php?s_type=partk&d_height=3312&j_ref=AS0001&j_name=j_name

I have tried setting "submit" with links like

HTML Code:
index.php?submit=submit&s_type=partk&d_height=3312&j_ref=AS0001&j_name=j_name

index.php?submit&s_type=partk&d_height=3312&j_ref=AS0001&j_name=j_name
How do I create a link that sets "submit so it gets processed rather than going through the form ???
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Old 06-08-2010, 08:11 PM   #2 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

I'm completely unsure if I'm following you here, but I think what you want is to use GET instead of POST and set some hidden fields to determine the values of query vars like d_height, etc.
delayedinsanity is offline  
Reply With Quote
Old 06-08-2010, 08:19 PM   #3 (permalink)
The Contributor
 
SaintIsaiah's Avatar
 
Join Date: Jan 2009
Posts: 48
Thanks: 5
SaintIsaiah is on a distinguished road
Default

I think he wants the ability of either posting the form data or getting the equivalent information from a url. If so, this may be the solution.

You can add the ability of checking if the same variables are set from the "$_GET" method.

But if this form is posting to a database, I wouldn't advise using "$_GET" at all. It's one of the easiest ways of injecting information into the SQL.
SaintIsaiah is offline  
Reply With Quote
Old 06-08-2010, 08:33 PM   #4 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

Have gone along the lines of using a hidden field and checking that, so thanks anyway guys :D
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Old 06-10-2010, 05:36 PM   #5 (permalink)
The Visitor
 
Join Date: Jun 2010
Posts: 1
Thanks: 0
Pinacolada is on a distinguished road
Default

Try to use form builder for installation neccesary options of php form.
Pinacolada is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
setting a users name in the url sarmenhb General 1 10-01-2008 05:13 PM
Setting up headphones/speakers as an Input Recording Device. Orc The Lounge 1 07-05-2008 05:21 PM
setting up multiple sub domains on local sarmenhb General 7 02-08-2008 06:25 PM
setting the default time zone Nor General 5 01-31-2008 04:51 PM
Setting integer to 0 at start of foreach Haris General 0 10-12-2007 04:41 AM


All times are GMT. The time now is 10:04 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design