Reply
Simple problem, causing alot!
Old 11-05-2009, 08:17 AM Simple problem, causing alot!
Super Talker

Posts: 109
Name: Not Telling
Trades: 0
I have a form:
PHP Code:
<form action="<?php echo $_SERVER['PHP_SELF'?>" method="post">
It shows up like this:

PHP Code:
<form action="/accounts-news.php" method="post"
How do I do it so it shows the whole url like this:

PHP Code:
<form action="http://example.com/accounts-news.php" method="post"
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
sith717 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-05-2009, 08:19 AM Re: Simple problem, causing alot!
chrishirst's Avatar
Super Moderator

Posts: 22,276
Location: Blackpool. UK
Trades: 0
Add the "http://..." bit into the form action attribute before the concatenation
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-05-2009, 08:45 AM Re: Simple problem, causing alot!
mtishetsky's Avatar
King Spam Talker

Posts: 1,166
Name: Mike
Location: Mataro, Spain
Trades: 0
form action="http://<?= $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] ?>"
__________________
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 11-05-2009, 08:46 AM Re: Simple problem, causing alot!
Super Talker

Posts: 109
Name: Not Telling
Trades: 0
Now it shows like this

@chrishirst

HTML Code:
 <form action="http:///accounts-news.php" method="post">
PHP Code:
<form action="http://<?php echo $_SERVER['PHP_SELF'?>" method="post">
Thats not what I ment... :P

--

@mtishetsky

Thanks thats what i needed.
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
sith717 is offline
Reply With Quote
View Public Profile
 
Old 11-05-2009, 08:55 AM Re: Simple problem, causing alot!
chrishirst's Avatar
Super Moderator

Posts: 22,276
Location: Blackpool. UK
Trades: 0
Quote:
<form action="/accounts-news.php" method="post">
Is it me or is just too difficult to see EXACTLY what you would need to add to the above????
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-05-2009, 09:18 AM Re: Simple problem, causing alot!
Super Talker

Posts: 109
Name: Not Telling
Trades: 0
I need to add it so it shows the whole url, I just had to add
PHP Code:
$_SERVER['HTTP_HOST'
so it shows it like

<form action="http://example.com/accounts-news.php" method="post">
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
sith717 is offline
Reply With Quote
View Public Profile
 
Old 11-05-2009, 09:31 AM Re: Simple problem, causing alot!
mtishetsky's Avatar
King Spam Talker

Posts: 1,166
Name: Mike
Location: Mataro, Spain
Trades: 0
The biggest lol here is

"PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done."
__________________
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 11-05-2009, 09:47 AM Re: Simple problem, causing alot!
chrishirst's Avatar
Super Moderator

Posts: 22,276
Location: Blackpool. UK
Trades: 0
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-05-2009, 01:25 PM Re: Simple problem, causing alot!
Skilled Talker

Posts: 61
Name: John
Trades: 0
Seriously...
Envision_frodo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Simple problem, causing alot!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13844 seconds with 13 queries