-
Coding?
How do i make a url like this:
http://www.yourdomain.subdomain.com/...username=check
^not a real link, its what i want.
And i dont have CGI access.
And then that url makes any parts with a username say their name like:
Welcome CHECK,
For any user. I have a login form, that will send certain users to a certain page, but i want it to be a user friendly where it says: "Welcome, USERNAME"
How would i do this?
The link to the page i want it to have the "Welcome, USERNAME" is: http://teamsoh.forumotion.com/userhomephp-h8.htm
The login page is: http://teamsoh.forumotion.com/sohmainlogin-h7.htm
(which i know you can see the passwords on the source code, i unencrypted them...)
Use this:
Username: member3
Password: password1
Last edited by Austin Klei; 02-16-2010 at 07:57 PM.
-
-
-
-
<?php echo $_GET['username']; ?>
Any server side language can do this (PHP, CGI, ASP, etc.).
If your host does not support any server side language(s) then:
1. I'd suggest getting a better host.
2. You can try to use Javascript and it is possible, but it's annoying and not as reliable (since it's happening in the browser rather than on the server, so the browser must cooperate with your code and might fail to output what you want depending on the system).
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
I cannot use it, but i see my portal for my website can do this:
/portal.htm?pid=3
How?
-
-
if you use .html extention you can't process the PHP. the extention must be .php
take a look to his website, abviously he is using php
-
-
In the server configuration (through .htaccess for example) file extensions can be controlled: .htm can be processed as php code, or anything you'd like.
However, this still means that there is some kind of software on the server processing it, and it probably has a default extension. If it's PHP, then .php will probably work. If it's ASP, then .asp; another option to try is JSP (Java server programming). And there are many other languages.
I don't know how your portal works or what your server configuration is, but in theory you should be able to access this if it exists somehow on the site.
One possibility is that your host disables direct access to configurations but sets up some system specifically to allow portals. This is somewhat unlikely, but it's not unlikely that there may be some security restrictions causing you problems. I recommend looking for a host that allows you more access if you plan to start using server programming languages.
One other possibility is that you could use .htaccess files to use mod_rewrite which is an apache module that basically takes the request url and then serves a different file. In = "page.php"; out = "anotherpage.htm". Of course it frequently gets much more complex than that, and this could in theory handle forwarding that form of URL to "regular" pages.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Lets use another site of mine as an example, (i dont want this coded on this website)
http://www.aeroware.realbb.net/portal.htm?pid=3
How is that possible to work?
-
-
Oh and is it also possible to make it in a script, for example via the username they use in the form, without having to make a certain page for each person.
-
-
Yes, this is all very possible, but you must use a server side language. PHP, ASP, JSP, CGI, Perl, and various others are all possible. This is not possible without that. A very BASIC version could be put together using Javascript, but that's probably a bad idea.
You probably also want to start using a database, such as MySQL, which will then work with PHP, etc.
1. Get a server that supports one of these languages (or don't bother trying)
2. Find an introduction tutorial and start looking at what the purpose of each language is-- what can you do with it?
3. Then and only then start trying to fix these specific problems... you need that background to get anything done.
Some introductory information is available here.
http://dynamicdrive.com/forums/showthread.php?t=25847
Remember that "PHP" has approximately the same capabilities as any server side language, but it's just the most popular, so you can use any you would like, but you do need one of them (and it doesn't have to be PHP).
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Could i use an external php page, but still use a .htm?user=username ?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks