Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:47:22+00:00 2026-06-10T07:47:22+00:00

I currently have 2 pages: Follow.php :a PHP page which is all setup with

  • 0

I currently have 2 pages:

  • Follow.php:a PHP page which is all setup with twitters api and will follow any user on twitter with the specific parameter you put in.

  • One index.php page, which has a list of links of people you can follow.

What I am looking to do is have it so when a user clicks on one of the people to follow on index.php, the variable in follow.php (which is used as a parameter and is the username of twitter account that is going to be followed) gets set to the name attribute of the link selected.

Now I am not the greatest developer, so I am not sure of the best way of doing this. There is probably a better way of doing it that what I am thinking of. I was thinking of using jquery to say something like:

$('a').click(function(){
<?php $group=?>$(this).attr('name'); //trying to set a php variable to name attr
})

This was going to be in its own new file,
then I was going to include this script into the follow.php script and use the variable. This is not working, unsurprisingly. I hope I explained what I was trying to do well.

So I have two questions.

Number 1:what is the best way of achieving what I am trying to do? can i do this all in php?

Number 2: is it possible to do what I was trying to do with jquery and setting the php var equal to the name attr?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:47:24+00:00Added an answer on June 10, 2026 at 7:47 am

    What you need to do is do a POST on the Follow.php page and accept the username value. This is a great resource for that: http://www.html.net/tutorials/php/lesson10.php

    You can simply set the link href for each tag on the index page to go got Follow.php?user=twitterHandle (where twitterHandle is the twitter username of a person). This way, you dont need to use any javascript at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a page which is declared as follows: public partial class MyPage
Currently I have two pages: The first page contains an input form, and the
I have a php file which I will be using as exclusively as an
I currently have some code which needs to perform multiple updates per user for
I'm currently writing a web application that have about 6-12 pages. On each one
Currently, I have a UIScrollView with X UIView as pages. I would like to
I currently have an advanced search page that searches a number of fields in
I currently have a product view page that contains an MVCContrib HTML Grid with
I currently have a web form aspx page that calls RegisterClientScriptBlock. This sends down
I currently have pagination functionality that displays the total page count, but I was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.