Jump to content

Recommended Posts

ok, right now im making a page for each member, but i want to make it so i can just click on the link for the member, and have it reload the page with the members info from mysql. Im also using the following link to get between pages:

 

<?php if (!isset($page)) {$page = "home";} include($page . ".php");?></td>

 

Now, what id like to do is this, send the person to the roster page, roster.php, from there, when they click on a user, i want it to save the username in a variable, then in the mysql query, use that variable, and have it reload in the same page. Ive seen sites that do this, and the url above looks like this: http://www.blah.com/?=roster_info,?=id=azrael or whatever, you know what i mean, please let me know what to put into my hyperlinks, and the code to put in the page to bring it up. Also, if you need more info from me, let me know. Im a nub at asking for help, i usually bullhead my way through or give up, but this is worth the time to ask for help! ^_^ also, the site im working on for this is at www.teamtru.com/beta

Link to comment
https://forums.phpfreaks.com/topic/1942-member-access/
Share on other sites

Firstly those URL's wouldnt be too search engine friendly and you will need to hand code much of your page to achieve this. With DMX2004 standard behaviours your urls would look like

 

http://www.your_site.com/roster.php?ID=users_ID

 

If this url is fine for you just use the standar detail page behaviour and pass the ID parameter, which it should do by default anyway. For more parameters just tick the pass existing parameters box on the wizard.

Link to comment
https://forums.phpfreaks.com/topic/1942-member-access/#findComment-6323
Share on other sites

ok, that would be fine for me if i was using standard html href page links, aka href="roster.php" but im not, im using, i think the word for it is dynamic, site layout.

 

My Index page:

<?php

 require_once('output_fns.php');

do_html_header('');

?>
<?php if (!isset($page)) {$page = "home";} include($page . ".php");?></td>
<?php

do_html_footer();

?>

 

Then in my links, i have the following:

        
<td ><a href="?page=roster"><font class="matchtitle">-=Roster=-</font></a></td>

 

So, when i click on a page, the url for it looks like this:

http://www.teamtru.com/beta/?page=roster

 

What i think i need, is a way to set a globla veriable inside the url, so when, for example, you click on my roster entry, instead of making another page for myself, it goes to a generic page, with the form already there, and sets the variable in the My SQL select code to azrael. This way i dont need to make a page for every person i add to the roster, i simply need to add them to the mysql database, and it will create their page automatically in the same form.

 

Tell me if im confusing you.

 

Im thinking the href code should be something like this:

<td ><a href="?page=roster,?id=azrael"><font class="matchtitle">-=Roster=-</font></a></td>

 

But im totally not sure on that. Thank you for you help though, its really appriciated. B)

Link to comment
https://forums.phpfreaks.com/topic/1942-member-access/#findComment-6324
Share on other sites

Ok, i think this post would be better off in PHP Help, as i dont really care about dreamweaver, as i only use for the sake of it, i enjoy writing code by hand, and i could really use some help with this, for as soon as i get this set, the site should be complete.

 

Also, i found an example of what i want:

http://www.teamnoa.net/?q=match&id=7 this style setup, youve got a page, then an id for the specific info needed, now how do i do that???

 

please help me! This is stumping the snot outta me :(

Link to comment
https://forums.phpfreaks.com/topic/1942-member-access/#findComment-6329
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.