![]() |
How to go to a particular page when i click on a particular word?
Hi,
I am in a particular page and this page displays few tables. when i click on a particular work i wanna go to a different page whose url would be something like this : http://www.konanakunteokkoota.org/applyhereforjob.php?username=$username&post_id=$po stid Can any one tell me how to do this? Thanks in advance. |
You will need to be more clear in what you are doing, are you looking for instructions on how to dynamically create links? Where will the data be coming from?
|
Thread moved to:
Absolute Beginners |
Quote:
|
@Village Idiot, sorry hehe ;)
@sandhyagupta, please let us have some more, info on what your after, so we can help out :) as Village Idiot, said. |
can't you just create a link and echo it to the page?
PHP Code:
Like Village Idiot and codefreak said, we need more information to help you out. |
Quote:
-Cf |
Quote:
sandhyagupta, whether you know it or not, your post was very vague and we really have nothing to go on with regards to understanding your problem and therefore nothing for us to help you with. Please come back and add some more detail to let us know exactly what you're wanting to do. |
I offered my opinion on a post..
//add random points ??, - all thoughts shall be made even if it is not that useful at that exact time, it is still a community of helping am i not right ? in my opinion i feel that a page with links like that could, slow it down as well be unsafe, but if i said something that is false, or so on, i am far away from being a php pro, but i do say safe php from the start or even have safe ways to code for example, code that could make a page slow, but please do correct me if i am wrong, no need to (flame up, on something i say) |
You make two claims.
|
Gee. Stop fighting. He was just stating his input, if he's incorrect, just post that in a commonly fasion.
When dealing with variables in links(or in any type of string - like an SQL query), I use sprintf. In this case: PHP Code:
|
on nr 2 on your list/question, i would say at least use sprintf..
|
I think I would do this just like what tony said, to just directly concatenate it to all of them then echo it in one go, all of the links. After you do the sanitation on both variables that is. I mean im assuming theres like a hundred or something of em, the links.
I have read somewhere that echoing something is slower than directly outputting it outside of php, but as for what Salanthe was asking, I have no idea how much the difference is. I think I said something similar somewhere and was answered that the difference was miniscule or something that it wont matter that much. |
Quote:
I still fail to see why the quoted code should be non-performant and insecure which is why I'm pushing for codefreek's own thoughts. It's not about right and wrong (there probably isn't such a clear distinction anyway) but just about making claims without putting them in context. Why do you think the code would be slowed down, what would you suggest instead? Why do you think the code is insecure, what would you suggest instead? |
I will want to click on any of the postions displayed in my table and then it has to direct me to that page depending on the postion. Hope i am clear this time.
|
Quote:
But whatever. I think he should use sprintf anyways, as I said ^^ Quote:
|
Thanks everybody for the reply.. my code is working fine as i wanted. But have a small error again. when i click n the first postion it is not taking the jobid. but when i click on the second one then it is taking the first job id and so on.
What exactly is the error. My code goes this way PHP Code:
|
Just a guess as I haven't looked properly but maybe you have to increment your job id i.e.:
PHP Code:
|
Thanks every one. there was a small mistake in the while loop.. now its working fine..
PHP Code:
|
| All times are GMT. The time now is 05:14 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0