when i execute this file.php only it will upload, when i run in Mainlayout.php its not uploading. Below file is File.php, its to upload csv file… Canone help me plzzzzzzzz
<script language=JavaScript>
<!--
function check_length(my_form)
{
maxLen = 160; // max number of characters allowed
if (my_form.my_text.value.length >= maxLen)
{
// Alert message if maximum limit is reached.
// If required Alert can be removed.
var msg = "You have reached your maximum limit of characters allowed";
alert(msg);
// Reached the Maximum length so trim the textarea
my_form.my_text.value = my_form.my_text.value.substring(0, maxLen);
}
else
{ // Maximum length not reached so update the value of my_text counter
my_form.text_num.value = maxLen - my_form.my_text.value.length;
}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: "Times New Roman", Times, serif}
-->
</style>
</head>
<body>
<div style="margin-left:50px; margin-top: -1em;font-family: initial;">
<h3>Professional Sms</h3></div>
<form action="" method="post">
<table border="3" style="margin-left:500px;margin-top:5px;font-family: initial;">
<tr><td>
YOUR MOBILE NO:<input name="fromno" type="text" size="10" maxlength="10"></td></tr>
<tr><td>TYPE MESSAGE:<textarea onKeyPress=check_length(this.form); onKeyDown=check_length(this.form); name=my_text rows=4 cols=30></textarea></td></tr>
<br>
<tr><td><input size=1 value=160 name=text_num> Characters Left</td></tr>
<tr><td><input type="submit" value="SendSMS"></td></tr>
</table>
</form>.
<div style="margin-left:553px; margin-top:-2em;">
<?php
include('datetime.php');
?>
</div>
</body>
I don’t see an “action” parameter in your form specification, could that be causing an issue? I’ve always specified a destination or a blank to return to the same page, stuff I’m reading (which is old) suggests that leaving it out can have varying results.
Be aware that the old mysql_* extension which you’re using is removed from version 7 of PHP (the current version). You need migrate over to using either the mysqli_* extension or PDO before your host migrates your server onto version 7 of PHP.
Presumably they will offer 7 as an option for a while so as to let people choose when they want to upgrade before eventually forcing the upgrade when unpatched security holes in 5.x make it too great a risk to allow it - keeping in mind that 5.5 reaches end of life in July this year and 5.6 only has 12 months of security patch support after that so that 5.x will be officially dead in less than 18 months time.
I would say the samething, but that’s only if the host is active enough to upgrade every client to a higher and secure version. I’ve seen a couple hosts that still offer PHP 5.2 even after it’s been dead.
There are also a lot still offering 5.4 - also dead.
I guess it depends on how long it takes for someone to find a security hole in one of the dead versions and start trashing servers that are still running dead versions.
There were quite a few hosts still offering 4 for a long time after it was dead but eventually they all had to get everyone on shared hosting to upgrade. The same will probably happen in two or three years time with 5.x…
I hope so. I just recently installed CentOS and it was a pain in the butt to install everything needed for the LAMP environment and with PHPMyAdmin as a GUI for database management. CentOS 7 kept throwing me errors when I was trying to install the epel 7 version and it kept saying that the package was not found. So I had no choice but to install epel 6 and then I had to manually install every single thing which was a pain. When I installed 1 repo, that repo kept complaining about not having another repo. And when I went to install that repo, it said I had to install another repo and it just kept going on and on for hours. After like 4 or 5 hours of attempting, I finally got LAMP & PHPMyAdmin to work. I needed PHPMyAdmin because I was trying to import some data from my .sql file which I’m not sure if I can do that manually with the terminal.
In the end, I found out that I installed PHP Version 5.4 along with PHPMyAdmin Version 4.4.6. So yeah, I do get why most hosts don’t upgrade. It’s a real pain in the butt just to upgrade versions if the host is hosting on a CentOS. On the other hand, if they are running Ubuntu, it would not be a problem.