Dobba
Usuario Novato
Usuario Novato

hola!! tengo una pregunta, no soy experta programcion, pero tengo ya varias paginas y digamos q ya entiendo un pokito aunq nuca lo suficiente, bueno mi pregunta es, si alguien sabe de algun manual o algo para poder poner en mi pagina un registro de usuarios, haber si me explico, es pa registrar usuarios y que solo los registrados puedan acceder a ciertos enlaces de mi pagina, seria posible? si alguien me puede ayudar se lo agradeceria. con lo q sea, direcciones de pagina dnd pueda leer algo, cualquier cosa, asias

Avatar Image
@man / @woman
@man / @woman

En www.electros.tk tienes un sistema de registro de usuarios en php y mysql.

"Netiqueta" en los foros, como comportarse y preguntar en los foros.

No Setup Programs
Avatar Image
@man / @woman
@man / @woman
Escrito originalmente por NoSetup.tk
En www.electros.tk tienes un sistema de registro de usuarios en php y mysql.
Muy buen registro de usuarios y proteccion, ademas de los scripts que agregan sobre el registro
LóciamCorp

Alojamiento, Dominios, Resellers, Servidores Dedicados y Diseño Web. Web Hosting para México, si eres nuevo pero sabes hacer sitios y requieres un servicio profesional y amable, visitanos.
Avatar Image
Usuario habitual
Usuario habitual

Y solo vale para PHP? No sabeis de algun sitio donde podamos copiar el código en HTML e insertarlo en la web? La mia es en HTML http://elvigia.esp.st
Gracias

Visita mi web, no paramos de crecer!!! http://elvigia.webcindario.com
Avatar Image
@man / @woman
@man / @woman

En el foro de electros.tk, el subforo html, busca entre los temas el codigo para registro de usuarios en html

LóciamCorp

Alojamiento, Dominios, Resellers, Servidores Dedicados y Diseño Web. Web Hosting para México, si eres nuevo pero sabes hacer sitios y requieres un servicio profesional y amable, visitanos.
Avatar Image
@man / @woman
@man / @woman

<script language="JavaScript1.2">

<!--
/*
This header must remain in place

Applies to Security aspect of script only
Title: Password Protection
http://www.plebius.org/javascripts/
Copyright 1999 All Rights Reserved.
http://www.plebius.org/copy.shtml
Owner: Plebius Industries
http://www.plebius.org
Author: Martin Kretzmann
scripts@plebius.org
License: GNU General Public License
http://www.plebius.org/scripts/license.html
*/


var GrantedURL = 'http://accept.html';
var DeniedURL = 'http://dontaccept.html';


var jim;
var gotoit;
suzy="0"
var capable;
var name = navigator.appName.toLowerCase();
var vers = parseFloat(navigator.appVersion);

if ((name.indexOf("netscape") >= 0 && vers >= 4) || (name.indexOf("microsoft") >= 0 && vers >= 4))
capable = true;
else
capable = false;

// Constants.

var FLDSEP; // Special characters used as separators in cookie data string.
var IDXSEP;

if (capable) {
FLDSEP = String.fromCharCode(1);
IDXSEP = String.fromCharCode(2);
}

//----------------------------------------------------------------------------
// Stores data currently entered on a form as cookies. Always returns true.
//
// name - The form name.
// months - Number of months to keep the cookies.
// exclude - A comma-delimited list of field names that should not be
// stored. Use to exclude sensitive data such as password,
// credit card numbers, etc.
//----------------------------------------------------------------------------

function storeData(name, months, exclude) {

var f;
var expdate;
var list, include;
var i;
var fld;
var data;
if ((document.myForm.pass.value==document.myForm.pass1.value)&&(document.jim.hiduser.value=="")&&(document.myForm.pass.value!="")){
name="jim";
document.jim.hidpass.value=document.myForm.pass.value;
document.jim.hiduser.value=document.myForm.user.value;
document.jim.hidname.value=document.myForm.name.value;
document.jim.hidhint.value=document.myForm.hint.value;
if (!capable)
return true;

// Get the named form, skip processing if not found.

if (!(f = document.forms[name]))
return true;

// Initialize the data field.

// Set the expiration date.

if (months == "")
months = 12;
expdate = new Date();
expdate.setMonth(expdate.getMonth() + months);

// Build a list of field names for exclusion.

list = new Array();
if (exclude != "") {
i = 0;
while ((i = exclude.indexOf(",")) >= 1) {
list[list.length] = exclude.substr(0, i);
exclude = exclude.substr(i + 1)
}
list[list.length] = exclude;
}

// Run through the fields and add field name/value pairs to the data string.

data = FLDSEP;
for (i = 0; i < f.length; i++) {
fld = f.elements[i];

// Is field in exclusion list?

include = true;
for (j = 0; j < list.length; j++)
if (fld.name == list[j])
include = false;

if (include) {

// Checkboxes and radio buttons.

if ((fld.type == "checkbox" || fld.type == "radio") && fld.checked)
data += setData(fld.name, fld.value);

// Selection lists (single).

if (fld.type == "select-one")
if (fld.selectedIndex >= 0)
data += setData(fld.name, fld.options[fld.selectedIndex].value);

// Selection lists (multiple). Add a unique name/value pair for each selected item.

if (fld.type == "select-multiple")
for (j = 0; j < fld.options.length; j++)
if (fld.options[j].selected)
data += setData(fld.name + IDXSEP + j, fld.options[j].value);

// Text fields.

if (fld.type == "hidden" || fld.type == "password" || fld.type == "text" || fld.type == "textarea")
data += setData(fld.name, fld.value);
}
}

// Set the cookie.

deleteCookie(name);
setCookie(name, data, expdate);
alert("user "+document.jim.hiduser.value+" has been added");

}
else if(document.myForm.pass.value==""||document.myForm.name.value==""||document.myForm.user.value==""||document.myForm.hint.value==""||document.myForm.pass1.value=="")
alert('fill in the form loser');
else alert("either your passwords don't match or you have registered with us before");
return true;
}
//----------------------------------------------------------------------------
// Retrieves data from the cookie and sets the values in the corresponding
// form fields. Returns true if data was found, false otherwise.
//
// name - The form name.
//----------------------------------------------------------------------------

function retrieveData(name) {

var f;
var i, j;
var fld;
var s;
var data;

if (!capable)
return false;

// Get the named form, return if not found.

if (!(f = document.forms[name]))
return false;

// Get the cookie for this form.

data = getCookie(name);
if (data == "")
return false;

// Run through the fields and retrieve the values.

for (i = 0; i < f.elements.length; i++) {
fld = f.elements[i];

// Checkboxes and radio buttons.

if ((fld.type == "checkbox" || fld.type == "radio") && (s = getData(fld.name, data)) != null && fld.value == s)
fld.checked = true;

// Selection lists (single).

if (fld.type == "select-one" && (s = getData(fld.name, data)) != null)
for (j = 0; j < fld.options.length; j++)
if (fld.options[j].value == s)
fld.options[j].selected = true;

// Selection lists (multiple).

if (fld.type == "select-multiple")
for (j = 0; j < fld.options.length; j++)
if ((s = getData(fld.name + IDXSEP + j, data)) != null && fld.options[j].value == s)
fld.options[j].selected = true;

// Text fields.

if ((fld.type == "hidden" || fld.type == "password" || fld.type == "text" || fld.type == "textarea") && (s = getData(fld.name, data)) != null)
fld.value = s;
}

return true;
}

/*****************************************************************************
* These functions set and retrieve the field name/value pairs stored in the *
* cookie. *
*****************************************************************************/

//----------------------------------------------------------------------------
// Given a field name and value, creates a name/value string that can be
// appended to the cookie data. A null string is returned if the given value
// is null.
//----------------------------------------------------------------------------

function setData(name, value) {

if (value != "")
return name + "=" + value + FLDSEP;
else
return "";
}

//----------------------------------------------------------------------------
// Given a field name, this function will extract the matching value found
// in the data string. Null is returned if no match is found.
//----------------------------------------------------------------------------

function getData(name, data) {

var i, j;
var s;

if (data == "")
return null;

s = FLDSEP + name + "=";
i = data.indexOf(s);
if (i >= 0) {
i += s.length;
j = data.indexOf(FLDSEP, i);
if (j >= 0)
return data.substr(i, j - i);
}

return null;
}

/*****************************************************************************
* These are the basic functions to set, get and delete a cookie. *
*****************************************************************************/

//----------------------------------------------------------------------------
// Set a cookie given a name, value and expiration date.
//----------------------------------------------------------------------------


function setCookie (name, value, expires) {

document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() + "; path=/";
}

//----------------------------------------------------------------------------
// Returns the value of the named cookie.
//----------------------------------------------------------------------------

function getCookie(name) {

var search;

search = name + "="
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length ;
end = document.cookie.indexOf(";", offset) ;
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(offset, end));
}
else
return "";
}

//----------------------------------------------------------------------------
// Delete the named cookie.
//----------------------------------------------------------------------------

function deleteCookie(name) {

var expdate = new Date();
expdate.setMonth(expdate.getMonth() - 1);
setCookie(name, "", expdate);
}
function checkpass(){
var bob;
if (document.jim.hiduser.value==document.jim.user.value)jim=true;
else jim=false;
if (document.jim.hidpass.value==document.jim.pass.value)bob=true;
else bob=false;
if ((jim==bob)&&(jim==true)){

alert("access granted");window.location=GrantedURL}
else {
suzy=suzy+1;
if (suzy>3){
alert("access denied, you will now be taken far away");
window.location=DeniedURL }
if (suzy<=3)
alert("access denied");
}
}
function getit(){
if (document.jim.hidhint.value==""){
alert("i\'m sorry "+document.jim.hidname.value+" but it appears you didn\'t answer the hint when you registered");}
else if (document.jim.hidhint.value==document.jim.hint.value){
alert("your password is "+document.jim.hidpass.value+".");}
else {alert("nope, that's not it")}
}
//-->

</script>




<!-- STEP TWO: Place the following in the BODY of your document -->

<BODY onLoad="retrieveData('jim')">

<table border=0 cellpadding=8 cellspacing=0 width=550>
<tr><td align=center colspan=2>
<hr noshade>
<font face="arial" size=4><b>Register here</b></font>
<hr noshade>
</td></tr>
<tr valign=top>
<td bgcolor="#cccccc" width=100> </td>
<td width=450>


<!-- ANOTHER STEP: Set the form action to action="mailto:your email address" -->
<form name="myForm" method=post action="mailto:your-email-address.com" onSubmit="storeData(this.name, 12,'user,pass,pass1,hint,name')">


<hr noshade>

<font size=3><b>input info here</b></font>

<p>

<table border=0 cellpadding=2 cellspacing=0>

<tr valign=bottom>

<td><font face="Courier New, Courier" size=2><b>your name</b></font></td>
<td colspan=3><input name="name" size=30 value=""></td>

</tr>
<tr valign=bottom>

<td><font face="Courier New, Courier" size=2><b>username</b></font></td>
<td colspan=3><input name="user" size=30 value=""></td>

</tr>

<tr valign=bottom>
<td><font face="Courier New, Courier" size=2><b>password</b></font></td>
<td colspan=3><input type="password" name="pass" size=30 value=""></td>
</tr>
<tr>
<td><font face="Courier New, Courier" size=2><b>re-enter password</b></font></td>
<td><input type="password" name="pass1" size=30 value=""></td>
</tr>

<tr valign=bottom>

<td><font face="Arial,Helvetica" size=2><b>password hint answer</b></font></td>
<td colspan=3><input name="hint" size=30 value="">
<input type="button" value="see the question" onClick="alert('your favorite sport is')"></td>
</tr>
</table>
<hr noshade>

<p>
<input type="submit" value="Submit">
<input type=reset value="Clear">


</form>

</font>
<form name="jim" method=post>


<hr noshade>
<font size=3><b>LOGIN</b></font>
<p>
<table border=0 cellpadding=2 cellspacing=0>
<tr valign=bottom>
<td><font face="Courier New, Courier" size=2><b>username</b></font></td>
<td colspan=3><input name="user" size=30 value=""></td>
</tr>

<tr valign=bottom>
<td><font face="Courier New, Courier" size=2><b>password</b></font></td>
<td colspan=3><input type="password" name="pass" size=30 value=""></td>
</tr>
<input type="hidden" name="hiduser" value="">
<input type="hidden" name="hidpass" value="">
<input type="hidden" name="hidname" value="">
<input type="hidden" name="hidhint" value="">
</table>
<hr noshade>

<p>
<input type="button" value="login" onClick="checkpass()">

<tr valign=bottom>
<td><font face="Courier New, Courier" size=2><b>forgotten password? answer <input type="button" value="this" onClick="alert('your favorite sport is')"</b></font></td>
<td colspan=3><input name="hint" size=30 value=""><BR><input type="button" value="get password" onClick="getit()"></td>
</tr>
</form>
</tr>
</table>

Dobba
Usuario Novato
Usuario Novato

gracias por la ayuda

User 84390
User 84390
Machacateclados
Machacateclados

mmm ave yo no tngo nipapa de php...pero e copiao este codigo kabeis puesto y sale un formulario..lo relleno tobien y bueno leugo m conecto y dice acceso admitido....muben mubonito...esto es seguro k sin esa contraseña y nombre de usuario no se puede entrar? y a dnd senvian esos datos? y se podria acer para k no sepuediera entrar sin admitirlos antes...?


ATENCIÓN: Este tema no tiene actividad desde hace más de 6 MESES,
te recomendamos abrir un nuevo tema en lugar de responder al actual
Opciones:
Ir al subforo:
Permisos:
TU NO PUEDES Escribir nuevos temas
TU NO PUEDES Responder a los temas
TU NO PUEDES Editar tus propios mensajes
TU NO PUEDES Borrar tus propios mensajes
Temas similares
TemaUsuariosRespuestasVisitasActividad
Por: , el 10/Dic/2005, 04:10
germangerman MaIcOl GestionXls NoSetup.org bienvvenido142kNov/10
Por: , el 23/Ago/2005, 10:20
CLURICAUN kn1f3eg12kAug/05
Por: , el 28/Ene/2005, 17:28
Alianza_wow Caos.X VaSaN105kJan/05
Por: , el 30/Oct/2004, 13:13
Tazex Juliova roberto_rc13 NoSetup.org52kJul/07
Por: , el 12/Abr/2004, 04:11
hackdj NoSetup.org www.ayudauni.net roberto_rc13 Ellocodelataquilla2239kSep/08