I've the following PHP executable, which is executed after a form is submitted.
<?php
{
mysql_connect("localhost","root","mypass");
mysql_select_db("mydb");
$myinput= $_POST['myinput'];
$result=MYSQL_QUERY("INSERT INTO mydb (myinput)".
"VALUES ('$myinput')");
mysql_close();
}
?>
Its working with short phrases, and numbers (approx 10 characters). But if I want to insert 150 character it just creates a blank line in the table.
The table has the following values: Type: LongText (I only need alphabetic characters, no numbers)
I see nothing in syslog , no errors there.
EDIT: I've noticed that if the input has a "whitespace/blankspace" in the end it will be posted no matter what the size is.
FE
This doesnt work, isnt imputed: "This is a long inputed text with xxx characters"
This works (Is inputed): "This is a long inputed text with xxx characters " (Notice the blankspace in the end)
EDIT2: My current php executable (welcome.php)
<?php
{
mysql_connect("localhost","root","my_pass");
mysql_select_db("my_db");
$variable = mysql_real_escape_string($_POST['variable']);
$result=MYSQL_QUERY("INSERT INTO `mydb_table` (`variable`) VALUES ('".$variable."')");
mysql_close();
}
?>
and this is the form which is inputing the data
<div id="create" ng-controller="Controller as vm" ng-show="accounts.mode === 'do-seed'">
<form action="welcome.php" method="post" id="seed-form" name="accountSeedForm">
<button id="generate" class="Button fade" ng-click="vm.generateSeed()" type="button">CREATE SEED</button>
<br/><br/>
<div class="form-field">
<label for="variable">variable</label>
<br/>
<textarea id="variable" rows="4" name="variable" class="InputR" xxxxxxxxxxxxxxxxxxx></textarea>
<span class="clipSpan" tooltipster tooltip-theme="tooltipster-theme1" title="Copy the seed to the clipboard." data-clipboard-target="#xxxxSeed" data-clipboard-message-success="xxxxxx successfully copied to clipboard" ></span>
<br/>
</div>
<br/>
<div class="wPop-content">
<div>ADDRESS
<br/>
<span>{{vm.displayAddress}}</span>
</div>
</div>
<button class="wButton fade" type="submit">REGISTER ACCOUNT</button>
<span class="divider-2"></span>
<button class="wButton fade" type="reset" ng-click="vm.back()">BACK</button>
</div>
</form>
</div>