johanes Posted July 25, 2005 Report Share Posted July 25, 2005 Lieta tāda ka ir reģistrācijas forma. Forma tiek aizpildīta pareizi (visi lauki kas ir jāaispilda ir aizpildīti). Un apstiprināta un visi mainīgie nodoti. Kļūdu pārbaude notiek o.k. Problēma sākās kad viss ir o.k., vietā lai pādītu paziņojumu par veiksmīgu reģistrēšanos rādās tukša lapa. Kā jau sapratāt dati neteik irrakstīti datu bāzē. Skripta beigas: $apppass = md5($apppass); if($appreviewer=='No'){ $ip = "$HTTP_SERVER_VARS[REMOTE_ADDR]"; $ms("insert into jo_players (username, password, email, fname, sname, country, status, ip, recruitedby, joined, site, showemail, bdaymonth, bdaydate, bdayyear, rank) VALUES('$appuser', '$apppass', '$appemail', '$appfname','$appsname', '$appcountry', '1', '$ip', '$appsrecruitname','$date','$appsite','$appshowemail','$appmonth','$appday','$appyear','New Recruit')") or die ("could not add $appuser to $clanname"); $ms("insert into jo_playersbackup (username, password, email, fname, sname, country, status, ip, recruitedby, joined, site, showemail, bdaymonth, bdaydate, bdayyear, rank) VALUES('$appuser', '$apppass', '$appemail', '$appfname','$appsname', '$appcountry', '1', '$ip', '$appsrecruitname','$date','$appsite','$appshowemail','$appmonth','$appday','$appyear','New Recruit')") or die ("could not add $appuser to the players backup table"); $ms("insert into jo_mail (sender,reciever,subject,body,time) values('$adminname','$appuser','Welcome To $clanname','Welcome $appuser to $clanname.<BR><BR> $welcomepm <BR><BR>$adminname','$overtime')") or die("Could not send mail."); $ms("update jo_players set recruitnums=recruitnums+1 where username='$appsrecruitname'") or die ("could not edit $appsrecruitname recruitment numbers"); print "<center><BR><B>Tu esi veiksmīgi reģistrējies Ogres Sv. Meinarda draudzes vortālā. Tev ir nosūtīts e-pasts, par iespējām vortālā. </B><BR><BR>"; include'includes/emailaccepted.php'; }elseif($appreviewer=='Code'){ $appcode=""; $allchars = 'abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ0123456789'; $string = ''; mt_srand ((double) microtime() * 1000000); for ($i = 0; $i < 9; $i++) $appcode .= $allchars{mt_rand (0,strlen($allchars))}; $ip = "$HTTP_SERVER_VARS[REMOTE_ADDR]"; $ms("insert into jo_playerapps (username, password, code, email, fname, sname, country, status, ip, recruitedby, joined, site, bdaymonth, bdaydate, bdayyear, rank, timeapplied) VALUES('$appuser', '$apppass', '$appcode', '$appemail', '$appfname','$appsname', '$appcountry', '1', '$ip', '$appsrecruitname','$date','$appsite','$appmonth','$appday','$appyear','New Recruit', ".time().")") or die ("could not add $appuser to the application list"); print "<center>Tu esi reģistrējies $clanname s vortālā. Tev ir nosūtīts e-pasts ar apstiprinājumu. <BR><BR>"; include'includes/emailverify.php'; }elseif($appreviewer=='Yes'){ $ip = "$HTTP_SERVER_VARS[REMOTE_ADDR]"; $ms("insert into jo_playerapps (username, password, email, fname, sname, country, status, ip, recruitedby, joined, site, bdaymonth, bdaydate, bdayyear, rank) VALUES('$appuser', '$apppass', '$appemail', '$appfname','$appsname', '$appcountry', '1', '$ip', '$appsrecruitname','$date','$appsite','$appmonth','$appday','$appyear','New Recruit')") or die ("could not add $appuser to the application list"); print "<center>Tu esi pievienots pie $clanname . Tev ir nosūtīts e-pasts, par iespējām vortālā. <BR><BR>"; include'includes/emailapprecieved.php'; } } } } include("includes/footer.php"); ?> Link to comment Share on other sites More sharing options...
Kavacky Posted July 25, 2005 Report Share Posted July 25, 2005 Ja vēl varētu tā vienkārši saprast, kas tev tur rakstīts. Link to comment Share on other sites More sharing options...
Klez Posted July 26, 2005 Report Share Posted July 26, 2005 kam ir domaats http://paste.php.lv ??? nu vareeji jau tos query sakariigaakus sa4iniit ;) Link to comment Share on other sites More sharing options...
v3rb0 Posted July 26, 2005 Report Share Posted July 26, 2005 * ieslēdz notices * kursh inserts neizpildas? * ifi strādā pareizi? * izecho ārā visus kverijus pirms izpildes un skaties kas tiek/netiek suutiits uz db * .. Link to comment Share on other sites More sharing options...
johanes Posted July 26, 2005 Author Report Share Posted July 26, 2005 Tur jau tā lieta ka uz datu bāzi nenosūta neko!!! Link to comment Share on other sites More sharing options...
bubu Posted July 26, 2005 Report Share Posted July 26, 2005 manuprāt $ms('insert ...'); izskatās ļoti aizdomīgi. Tu esi pārliecināts, ka tur tā jābūt, nevis $$ms(..) vai mysql_query(..) ? error_reporting(E_ALL) uzliec lūdzu koda sākumā, a? Link to comment Share on other sites More sharing options...
johanes Posted July 26, 2005 Author Report Share Posted July 26, 2005 Man līdzīga reģistrācijas forma ir administrātora panelī un turviss ok ??!!! Paldies bubu izmeiģināšu.... Link to comment Share on other sites More sharing options...
bubu Posted July 26, 2005 Report Share Posted July 26, 2005 Man līdzīga reģistrācijas forma ir administrātora panelī un turviss ok ??!!! 19890[/snapback] Un kāpēc tu mums to jautā? Vai mums zināt vai tur (un kur?) viss ir ok? Link to comment Share on other sites More sharing options...
johanes Posted July 26, 2005 Author Report Share Posted July 26, 2005 Un kāpēc tu mums to jautā? Vai mums zināt vai tur (un kur?) viss ir ok? 19891[/snapback] Meiģinu atrisināt problēmu!!!!!!!!! Link to comment Share on other sites More sharing options...
Toms Posted July 26, 2005 Report Share Posted July 26, 2005 Pirmām kārtām: Iemācieties vienreiz rakstīt kārtīgu, saprotamu kodu! :angry: Smuks, viegli uztverams "code indent" Koda izskats vispārīgi.. Best Practices: PHP Coding Style Link to comment Share on other sites More sharing options...
johanes Posted July 27, 2005 Author Report Share Posted July 27, 2005 Pirmām kārtām: Iemācieties vienreiz rakstīt kārtīgu, saprotamu kodu! Tas problēmu neatrisina Link to comment Share on other sites More sharing options...
Venom Posted July 27, 2005 Report Share Posted July 27, 2005 tas palīdz tavu problēmu atrisināt citiem Link to comment Share on other sites More sharing options...
v3rb0 Posted July 27, 2005 Report Share Posted July 27, 2005 (edited) identeet kodu paliidz un kaa veel! ne tikai citiem bet arii pasham. vaina ir ka uzrakstiits ir viens, bet domaa ka ir kaut kas cits un nevar vinsh pats savaa scriptaa ieraudziit kas pa lietu. pie tam iekopeetajiem ifiem beigaas ir 3 liekas figuriekavas. taa ka kas tur veel ir nevaru zinaat. visticamaak shitais iekopeetais gabals nemaz ij neizpildaas. Edited July 27, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
des Posted July 28, 2005 Report Share Posted July 28, 2005 Pirmām kārtām: Iemācieties vienreiz rakstīt kārtīgu, saprotamu kodu! :angry: Smuks, viegli uztverams "code indent" Koda izskats vispārīgi.. Best Practices: PHP Coding Style 19893[/snapback] Nu nevareeju nepanjirgaaties drusku: http://www.moxleystratton.com/articles/phpcode/ Use tab characters instead of spaces for indentation. http://www.developer.com/lang/php/article....10941_2193341_2But they also expand on it, specifying that 4 spaces should be used for indents, and "tab" should never be used. :D :D :blink: :blink: :blink: :) :lol: Link to comment Share on other sites More sharing options...
Toms Posted July 28, 2005 Report Share Posted July 28, 2005 Es atradu veel: typical "unit" consists of 4 spaces, though some people prefer to use a single tab or an alternate number of spaces.Bet tas nu nav tas svarīgākais - galvenais, lai būtu indent. (Es lietoju TAB, kas ir četru space platumā) Vēl jautājums šāds: Kāds stils ir biežāk piekopts? if (kaut == kas){ //Viss notiek } VAI if (kaut == kas){ //Viss notiek } Es izmantoju pirmo variantu, bet domāju pāriet uz otru. Vienīgi kods izstieptāks paliek... Nez.. Link to comment Share on other sites More sharing options...
Recommended Posts