フォームに入力した「ソ」のあとに半角の「¥」マークが付く - PHPプロ!Q&A掲示板
キーワード / 誤動作  
久しぶりの質問投稿になります
言葉では説明しにくいですが
現状はこうです
|ソ |⇒送信ボタン⇒|ソ¥ |
となってしまいます
なお、これは「ソ」だけのことで(現状では)「ア」「ダ」「ン」などのほかの文字はこのような
症状が発生しません
問題のソースを投稿しますので問題点を指摘してください
Input.class.php
- // 確認ページの作成
- public function privatecheck(){
- $this->license = $_POST["license"];
- $this->hurigana = $_POST["hurigana"];
- $this->name = $_POST["name"];
- $this->id = $_POST["id"];
- $this->pass = $_POST["pw"];
- $this->birthday = $_POST['birthday'];
- $this->revision = $_POST['revision'];
- $this->hurigana = mb_convert_kana($this->hurigana,"KVC","Shift_JIS");
- mb_regex_encoding("SJIS");
- // 入力のチェック
- if ($this->db = sqlite_popen($this->DBfile,0660,$sqliteerror)){
- if(isset($_POST["id"])){
- //データを取り出す
- // SQLiteに users テーブルがあるか調べる
- $this->qstring = "select name from 'sqlite_master' where type='table' and name='users'";
- $this->qresult = sqlite_query($this->db,$this->qstring);
- $this->fresult = sqlite_fetch_array($this->qresult);
- // SQLiteにテーブルがなければ users テーブルを作る
- if(FALSE==$this->fresult){
- $this->qstring = "create table users (idno integer primary key,user varchar(25),pass char(25),license varchar(5),hurigana varchar(15),name varchar(10),birthday int(8),handlename varchar(10),color varchar(5),taste varchar(15),job varchar(15),publicbirthday varchar(5),sex varchar(5),word varchar(15),coin int(15))";
- $this->qresult = sqlite_query($this->db,$this->qstring);
- }
- // SQLiteに messages テーブルがあるか調べる
- $this->mqstring = "select name from 'sqlite_master' where type='table' and name='messages'";
- $this->mqresult = sqlite_query($this->db,$this->mqstring);
- $this->mfresult = sqlite_fetch_array($this->mqresult);
- // SQLiteに messages テーブルがなければ messages テーブルを作る
- if(FALSE==$this->mfresult){
- $this->mqstring = "create table messages (idno integer primary key,user varchar(25),messagetitle varchar(15),messageno varchar(15),message text)";
- $this->mqresult = sqlite_query($this->db,$this->mqstring);
- }
- // SQLiteに products テーブルがあるか調べる
- $this->pqstring = "select name from 'sqlite_master' where type='table' and name='products'";
- $this->pqresult = sqlite_query($this->db,$this->pqstring);
- $this->pfresult = sqlite_fetch_array($this->pqresult);
- // SQLiteに products テーブルがなければ products テーブルを作る
- if(FALSE==$this->pfresult){
- $this->pqstring = "create table products (idno integer primary key,productname varchar(25),filea text,fileb text,filec text,productmessage text,priceyen int(10),pricecoin int(10),shopno int(10))";
- $this->pqresult = sqlite_query($this->db,$this->pqstring);
- }
- // SQLiteに logs テーブルがあるか調べる
- $this->lqstring = "select name from 'sqlite_master' where type='table' and name='logs'";
- $this->lqresult = sqlite_query($this->db,$this->lqstring);
- $this->lfresult = sqlite_fetch_array($this->lqresult);
- // SQLiteに logs テーブルがなければ logs テーブルを作る
- if(FALSE==$this->lfresult){
- $this->lqstring = "create table logs (idno integer primary key,user varchar(25),boughtday int(12),productname varchar(25),priceyen int(10),pricecoin int(10))";
- $this->lqresult = sqlite_query($this->db,$this->lqstring);
- }
- // SQLiteに faqs テーブルがあるか調べる
- $this->fqstring = "select name from 'sqlite_master' where type='table' and name='faqs'";
- $this->fqresult = sqlite_query($this->db,$this->fqstring);
- $this->ffresult = sqlite_fetch_array($this->fqresult);
- // SQLiteに faqs テーブルがなければ faqs テーブルを作る
- if(FALSE==$this->ffresult){
- $this->fqstring = "create table faqs (idno integer primary key,question varchar(25),answer text)";
- $this->fqresult = sqlite_query($this->db,$this->fqstring);
- }
- $this->qstring = "select pass from users where user='{$this->id}'";
- $this->qresult = sqlite_query($this->db,$this->qstring);
- $count = sqlite_num_rows($this->qresult);
- $today = getdate(); $year=sprintf("%04d",$today['year']); $month=sprintf("%02d",$today['mon']); $day=sprintf("%02d",$today['mday']);
- $nenrei=(int)((($year*10000)+($month*100)+$day - $this->birthday)/10000);
- $this->birthy = substr($this->birthday,0,4); $this->birthm = substr($this->birthday,4,2); $this->birthd = substr($this->birthday,-2);
- if($nenrei < 20 and V==$this->license)
- { $this->errorm["license"]["mess"] = "※"; $this->errorm["elicense"]["mess"] = "ライセンス:誤選択 "; $this->errors++; }
- if(0==mb_strlen($this->hurigana))
- { $this->errorm["hurigana"]["mess"] = "※"; $this->errorm["ehurigana"]["mess"] = "フリガナ:未入力 "; $this->errors++; }
- elseif(!mb_ereg("([ァ-ヶ]) ([ァ-ヶ])+$",$this->hurigana))
- { $this->errorm["hurigana"]["mess"] = "※"; $this->errorm["ehurigana"]["mess"] = "フリガナ:誤入力 "; $this->errors++; }
- if(0==mb_strlen($this->name))
- { $this->errorm["name"]["mess"] = "※"; $this->errorm["ename"]["mess"] = "名前:未入力 "; $this->errors++; }
- elseif(!mb_ereg("([ぁ-んァ-ヶ亜-腕弌-黑纊-黑]) ([ぁ-んァ-ヶ亜-腕弌-黑纊-黑])+$",$this->name))
- { $this->errorm["name"]["mess"] = "※"; $this->errorm["ename"]["mess"] = "名前:誤入力 "; $this->errors++; }
- if(0==mb_strlen($this->id))
- { $this->errorm["id"]["mess"] = "※"; $this->errorm["eid"]["mess"] = "PASSID:未入力 "; $this->errors++; }
- elseif(!preg_match('/^[a-zA-Z0-9_\.\-]+?@[A-Za-z0-9_\.\-]+$/',$this->id))
- { $this->errorm["id"]["mess"] = "※"; $this->errorm["eid"]["mess"] = "PASSID:誤入力 "; $this->errors++; }
- elseif(sqlite_num_rows($this->qresult) > 0)
- { $this->errorm["id"]["mess"] = "※"; $this->errorm["eid"]["mess"] = "PASSID:ID重複 "; $this->errors++; }
- if(0==strlen($this->pass))
- { $this->errorm["pw"]["mess"] = "※"; $this->errorm["epw"]["mess"] = "PASSWORD:未入力 "; $this->errors++; }
- elseif(!mb_ereg("([a-zA-Z0-9])+$",$this->pass))
- { $this->errorm["pw"]["mess"] = "※"; $this->errorm["epw"]["mess"] = "PASSWORD:誤入力 "; $this->errors++; }
- if(0==strlen($this->birthday))
- { $this->errorm["birthday"]["mess"] = "※"; $this->errorm["ebirthday"]["mess"] = "生年月日:未入力 "; $this->errors++; }
- elseif(!mb_ereg("([0-9]{8})+$",$this->birthday))
- { $this->errorm["birthday"]["mess"] = "※"; $this->errorm["ebirthday"]["mess"] = "生年月日:誤入力"; $this->errors++; }
- if($this->license == "S"){ $this->license = "Standard";$this->coin = 1000; }
- if($this->license == "V"){ $this->license = "VIP";$this->coin = 10000; }
- $this->revision = 1;
- if(1 == $this->check){ $_SESSION["form1"] = "publicinput"; }
- elseif(0 == $this->errors){ $_SESSION["form1"] = "privatechecked"; }
- }
- }
- }
- <form action=input.php method=post>
- <FONT size="2"> 新しく X-plate Account を作成します。<BR>
- </FONT>
- <FONT size="2"> はじめに、個人情報を登録いたしますので、必要事項を入力して「確認」をクリックしてください。<BR>
- </FONT>
- <FONT size="2"> <font color=orange>{$error.elicense.mess}{$error.ehurigana.mess}{$error.ename.mess}{$error.ehandlename.mess}{$error.eid.mess}{$error.epw.mess}{$error.ebirthday.mess}<BR>
- </FONT>
- <FONT size="2"> お申し込みライセンス(Guest Lisence は登録不要です。<strike>また、20歳未満のお客様は VIP Lisence を作成できません。</strike>)<BR>
- </FONT>
- <FONT size="2"> <font color=red>{$error.license.mess}</font>
- {if $license == "Standard"}<input type = "radio" name = "license" value = "S" checked>Standard <input type="radio" name = "license" value = "V" disabled>VIP(準備中)
- {elseif $license == "VIP"}<input type = "radio" name = "license" value = "S">Standard <input type="radio" name = "license" value = "V" disabled>VIP(準備中)
- {else}<input type = "radio" name = "license" value = "S" checked>Standard <input type="radio" name = "license" value = "V" disabled>VIP(準備中)
- {/if}<BR>
- </FONT>
- <FONT size="2"> お名前(姓と名の間に全角スペースを入れてください)<BR>
- </FONT>
- <FONT size="2"> フリガナ<font color=red>{$error.hurigana.mess}</font><input type=text name=hurigana value="{$hurigana}" size=30 maxlength=15><BR>
- </FONT>
- <FONT size="2"> 名前 <font color=red>{$error.name.mess}</font><input type=text name=name value="{$name}" size=30 maxlength=10><BR>
- </FONT>
- <FONT size="2"> PASSID(連絡が取れるメールアドレスをご入力ください)<BR>
- </FONT>
- <FONT size="2"> <font color=red>{$error.id.mess}</font><input type=text name=id value="{$id}" size=30 maxlength=25><BR>
- </FONT>
- <FONT size="2"> PASSWORD(半角英数字で入力。連番など、他人に認識されやすいものは控えてください)<BR>
- </FONT>
- <FONT size="2"> <font color=red>{$error.pw.mess}</font><input type=password name=pw value="{$passwd}" size=30 maxlength=25><BR>
- </FONT>
- <FONT size="2"> 生年月日(半角数字のみで入力。例:1992年8月26日の生まれ場合 ⇒ 19920826)<BR>
- </FONT>
- <FONT size="2"> <font color=red>{$error.birthday.mess}</font><input type=text name=birthday value="{$birthday}" size=30 maxlength=8><BR>
- </FONT>
- <FONT size="2"><BR>
- </FONT>
- <FONT size="2"><TABLE><TR><TD> <input type=reset name=reset value=" 消去 "> <input type=submit name=submit value=" 確認 >> "></form></TT></TR></TABLE>
- </FONT>
この質問への意見の募集は締め切られ、ポイントは既に配分されました。
意見を投稿することはできますが、ポイントを受け取ることはできません。





ページのトップへ


GETのままでは検索エンジンのロボットが拾ってくれなかったためにSEO対策として有効だと言われていますね。