Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Text link to submit a form using Post method (http://www.go4expert.com/forums/text-link-submit-form-using-post-method-t7415/)

jmejiaa 21Nov2007 00:24

Text link to submit a form using Post method
 
This is my first post, I'm a senior(college) right now taking a class on PHP and we are using the Facebook API to create applications. this is the first time I ever work with PHP and web developing for that matter.I need to create a list of links which I populate using a database and my own tables. This I did, now I need that when I click a link the program directs me to another page but I need to send some kind of ID to this page so I can do something different with each link. I have tried learning to do this is Javascript only to find out Facebook doesn't allow it.

Facebook has a method that looks like it does this but I am not sure how to use it.
http://wiki.developers.facebook.com/index.php/Fb:submit

I hope I made myself clear, I did this with drop down menus but I can't figure it out with the links. Thanks in advance.

pete_bisby 21Nov2007 01:02

Re: Text link to submit a form using Post method
 
Well not looking into the Facebook API, it must filtering out the "/Fb:submit" information and performing a function based on this information.

However, if you do have a URL (e.g. http://www.some-website.com/index.ph...t1&info2=test2), the information placed after the question mark will be placed within the $_GET array. In this example $_GET["info1"] = "test1" and $_GET["info2"] = "test2".

pete_bisby 21Nov2007 01:04

Re: Text link to submit a form using Post method
 
It might be an idea to look through the Facebook documentation (http://wiki.developers.facebook.com/index.php/Main_Page) - it may have some reference to what you're after.

jmejiaa 21Nov2007 02:14

Re: Text link to submit a form using Post method
 
Quote:

Originally Posted by pete_bisby
It might be an idea to look through the Facebook documentation (http://wiki.developers.facebook.com/index.php/Main_Page) - it may have some reference to what you're after.

I tried that but couldn't find much, I think I will end up using the get method. I just didn't want the info in the url. Thanks!

pete_bisby 21Nov2007 13:17

Re: Text link to submit a form using Post method
 
Aaaahh, found it!!!

Facebook documentation: (http://wiki.developers.facebook.com/index.php/Fb:submit)
Creates a JavaScript submission mechanism for a form, which makes image or text links act as Submit buttons. Markup contained by this tag is surrounded with an <a> tag that includes a submit onclick action.

Basically, anything contained within the <fbsubmit> .... </fb:submit> tags acts as a submit button. All of the tags that Facebook uses can be found at http://wiki.developers.facebook.com/index.php/FBML. By the looks of things they have their own set of HTML markup tags. This is to ensure that everyone that develops applications to work with Facebook can integrate successfully.

jmejiaa 22Nov2007 03:21

Re: Text link to submit a form using Post method
 
I saw that also, but I guess being the first time woring with web programming I am lost as to how to implement that. This is what i need done, I did it with Get but I would like to do it with post.

while($row = mysql_fetch_array($result))
{
echo '<a href="/voteapp//lists.php?listid='.$row["listid"].'">'.$row['topic'].'</a>'.'</br>';
}

$row["listid"] Is the value I need to pass on to the new page when i open it.


All times are GMT +5.5. The time now is 06:51.