473,231 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

help...adduser

Hi!

I have a problem and wonder if anyone can help me with that. I am trying
to make a community in php/mysql to work but it don't. I hope you can
help me even if the community is in swedish.

Php an mysql is up and running and it works.

Here is the comminity:
http://kamrate.se/iwcommunity/default.php

The problem is when I try to registrate a new user here:
http://kamrate.se/iwcommunity/login/...?login=newuser

I choose a username=användarnamn, a password=lösenord and an
emailadress=E-post, but when I press Create account=Skapa konto I get
this error:

No username?=
Inget användarnamn?

A username have to contain at least four signs!=
Ett användarnamn måste bestå av minst fyra tecken!

The add user page looks like this:

<?php // top.inc ?>
<?php require ('\program\apache
group\apache2\htdocs\iwcommunity\_inc\top.inc'); ?>

<?php // Innehåll ?>

<?php if($login = "adduser") { ?>

<table cellpadding="0" cellspacing="0" style="border-width: 1pt;
border-color: #000000; border-style: solid" align="left">

<tr>
<td class="menux" width="20"></td>
<td class="menux"><br><span class="rubrik">Skapa
användarkonto</span><br><img src="/iwcommunity/_media/line.gif"
vspace="5" height="1" width="100%"></td>
<td class="menux" width="10"></td>
</tr>

<tr>
<td class="menux" width="10"></td>
<td class="menux" width="600" height="200" valign="top"><span
class="brodtext">

<?php $kontroll = 1;
$andrakontroll = 0;
$length = strstr($epost, '@');
$for = substr($length, 0, 1);
if($username == "") { ?>
<span class="rubrik">Inget användarnamn?<br>
<img src="/iwcommunity/_media/line.gif" vspace="5" height="1"
width="100%"><p></span>

<?php echo("Ett användarnamn måste bestå av minst fyra tecken!");
echo("<p>");
echo("<a href=/iwcommunity/login/login.php?login=newuser
class=menulank>Återgå</a>");

$kontroll = 0;

} elseif($password == "") { ?>

<span class="rubrik">Inget lösenord?<p></span>

<?php echo("Du måste skriva in ett lösenord för att skapa ett
användarkonto!");
echo("<p>");
echo("<a href=/iwcommunity/login/login.php?login=newuser
class=menulank>Återgå</a>");

$kontroll = 0;

} elseif($epost == "") { ?>

<span class="rubrik">Ingen e-postadress?<p></span>

<?php echo("Du måste skriva in en e-postadress!");
echo("<p>");
echo("<a href=/iwcommunity/login/login.php?login=newuser
class=menulank>Återgå</a>");

$kontroll = 0;

} elseif(strlen($username) < 4) { ?>

<span class="rubrik">För kort användarnamn!<p></span>

<?php echo("Ditt användarnamn måste bestå av minst fyra tecken!");
echo("<p>");
echo("<a href=/iwcommunity/login/login.php?login=newuser
class=menulank>Återgå</a>");

$kontroll = 0;

} elseif(strlen($password) < 4) { ?>

<span class="rubrik">För kort lösenord!<p></span>

<?php echo("Ditt lösenord måste bestå av minst fyra tecken!");
echo("<p>");
echo("<a href=/iwcommunity/login/login.php?login=newuser
class=menulank>Återgå</a>");

$kontroll = 0;

} elseif($for != "@") { ?>

<span class="rubrik">Inget @-tecken?<p></span>

<?php echo("Din e-postadress måste innehålla ett @-tecken!");
echo("<p>");
echo("<a href=/iwcommunity/login/login.php?login=newuser
class=menulank>Återgå</a>");

$kontroll = 0;

} elseif($kontroll = 1) {

$open = mysql_connect("localhost", "iwcommunity", "iwcx");

$sql = mysql_db_query("iwcusers", "SELECT * FROM users", $open);

while ($rad = mysql_fetch_array($sql)) {

if($username == $rad["username"]) { ?>

<span class="rubrik">Användarnamnet finns redan<p></span>

<?php echo("Användarnamnet du vill använda finns redan!
Återgå och välj ett nytt!");
echo("<p>");
echo("<a
href=/iwcommunity/login/login.php?login=newuser class=menulank>Återgå</a>");

$andrakontroll = 1;

break;

}

}

if($andrakontroll != 1 & $kontroll == 1) {

mysql_close($open);

$blevmedlem = date("Y-m-d");
$antalbesok = 1;
$saknas = 0;

$open = mysql_connect("localhost", "iwcommunity", "iwcx");

mysql_db_query("iwcusers", "INSERT users (username, password,
epost, blevmedlem, antalbesok, year, month, day, mek, senast, egensida,
presentation, intressen, favoritfarg, hogstaonskan, yrke)
VALUES('$username', '$password', '$epost', '$blevmedlem', '$antalbesok',
'$saknas', '$saknas', '$saknas', '$saknas', '$saknas', '$saknas',
'$saknas', '$saknas', '$saknas', '$saknas', '$saknas')");

mysql_close($open);

?>

<span class="rubrik">Nytt användarkonto skapat<p></span>

Hallå där <b><?php echo($username) ?></b>! Nu är ditt användarkonto
klart att börja användas. Gå till <a href="/iwcommunity/default.php"
class="menulank">inloggningssidan</a>
och logga in som vanligt.<p>

<b>Glöm inte dina uppgifter!</b><p>

Användarnamn: <b><?php echo($username)?></b><br>
Lösenord: <b><?php echo($password)?></b><br>

<?php } ?>
<?php } ?>
<?php } ?>

<?php // bottom.inc ?>
<?php require ('\program\apache
group\apache2\htdocs\iwcommunity\_inc\bottom.inc') ; ?>

Thanks
Yvonne
Aug 15 '05 #1
0 1651

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
3
by: Graham Parsons | last post by:
We are experiencing the following on two PCs running WebLogic server .... even though every other PC in the organisation has no such problems running the same software. Anyone who could shed any...
2
by: morphex | last post by:
Hi there, does anyone here know of a script that enables adding of users on UNIX platforms via python? Thanks, Morten
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
3
by: Vagabond | last post by:
I have a section of code that seems to work untill I go to get the result but can't see what I am doing wrong. function Edit_User(){ global $conn; Connect_to_db(); $sql = "SELECT * FROM...
3
by: wdandrews1 | last post by:
/* Remove.c ** Usage: remove < In_file Out_file (using redirection) */ #include <stdio.h> #include <stdlib.h> int main(void) { char c; int space = 0;
13
by: Apostle | last post by:
Hi all, after thinking for sometimes, I thought it will be great opportunity to learn if I will start from scratch and build my own register/login system. Here is the thread that I will be posting...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.