| |
|
Welcome to KnowledgeSutra - Dear Guest | |
$_post Without A Form
#1
Posted 03 June 2005 - 06:11 PM
#2
Posted 03 June 2005 - 06:34 PM
<INPUT TYPE="SUBMIT" VALUE="Button Text" STYLE="background:#ffff00 none; color:#0000ff">
That would create a yellow button with blue text. I could also looking into using plain text and images if you would like me to.
#4
Posted 04 June 2005 - 04:12 AM
#5
Posted 04 June 2005 - 08:00 AM
I will use an example form
<form name="example" method="post" action="yourscriptname.php">
put the following code in your <HEAD> section
<script language="JavaScript" type="text/javascript">
<!--
function example ( selectedtype )
{
document.formname.supporttype.value = selectedtype;
document.formname.submit();
}
-->
</script>
then you can add this as your submit:
<input type="hidden" name="supporttype" />
<a href="javascript:example('submit')">Submit</a>
Hope this helps you
#6
Posted 05 June 2005 - 04:05 AM
Anyway I will be upping Hmmz's rep as that is exactly what I wanted to do, thanks.
#7
Posted 05 June 2005 - 04:30 AM
#8
Posted 05 June 2005 - 06:15 AM
or use a page function and just logout the user on the same page, you don't need to use a form to log a user out, you could build a class in your index.php, for the logout, with an if() statement to ensure it works
use the following link to function as logout:
//make sure the user exists
if($user){
echo "<a href=\"login.php?out=yes&user=$user\">Logout</a>";
}
then make the function "out"$logout = $_GET['out']; // makes sure their logging out
$user = $_GET['user']; // gets the username
if ($logout == "yes") {
mysql_query("DELETE FROM active_users WHERE name='$user'"); // Logs them out
}
if you don't have an "active_users" field in your user table, you should add it, it makes life easier
Anyway, hope this helps
#9
Posted 05 June 2005 - 04:02 PM
#11
Posted 01 May 2009 - 03:23 PM
for future reference, you can make a button look like text using css.
the button looks like a button, because it is given a special 'button' border and background, so the corresponding css to make it not look like a button is:
{ display: inline; border: none; background: transparent;}of course, what you actually want it to look like is a link, so you will want to colour it right, and set cursor: pointer and so forth too...
#12
Posted 31 July 2009 - 01:13 AM
I had figured out the use of logout.Php by myself, but this I want my web site fool proof, meaning that the user should log out if, and only if he / she clicks the log out-link. My site is just like fffanatics', with a menu consisting of <a> tags and the Log out option. My problem is that if I have a page (logout.Php), a user could obviously log out from the account just by visiting that page (typing it in the address bar), which I do not want. Is there any way to fix this, still without using JavaScript?
-reply by Sindre#16
Posted 07 December 2009 - 03:04 AM
It would be safer to use Javascript and work around a solution. Better still just bear with a submit button. Get is just too insecure.
Anyway, thats just my opinion.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















