hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is shown and through javascript all the fields can be copied multiple times so I need to store the data in array (got hint from here -> http://www.evolt.org/node/60222 ), I manage to save the data but while displaying i get lot of errors
Notice: unserialize() [function.unserialize]: Error at offset 0 of 1 bytes in C:wampwwwartustestme.php on line 67
Notice: unserialize() [function.unserialize]: Error at offset 9 of 10 bytes in C:wampwwwartustestme.php on line 67
this is my php code
Code: <?php
////////////////////////////function defination///////////////////////
function showMonth()
{
$arr=array("January","February","March","April","May","June","July","August","September","October","November","December");
for($i=0;$i<count($arr);$i++)
{
echo "<option value='".$arr[$i]."'>".$arr[$i]."</option>";
}
}
function showYear()
{
$d=getdate();
$curYear=$d['year'];
for($i=$curYear;$i>($curYear-50);$i--)
{
echo "<option value='".$i."'>".$i."</option>";
}
}
// connect to database
define("HOST","localhost");
define("USER","root");
define("PASS","");
define("DATABASE","artuscom");
$con = mysql_connect(HOST,USER,PASS);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db(DATABASE, $con);
// ends here
// start post
if (isset($_POST['submit']))
{
$org = serialize($_POST['curEmpName']);
$des = serialize($_POST['curEmpDesignation']);
$start_month = serialize($_POST['curEmpStartMonth']);
$start_year = serialize($_POST['curEmpStartYear']);
$end_month = serialize($_POST['curEmpEndMonth']);
$end_year = serialize($_POST['curEmpEndYear']);
$query="Insert into artus_test values('','$org','$des','$start_month','$start_year','$end_month','$end_year')";
$result=mysql_query($query);
if ($result) {
echo 'success';
} else { echo 'something failed...';}
}
// show records
if (isset($_POST['showrecord']))
{
$query='SELECT * FROM artus_test';
$result=mysql_query($query);
while($row = mysql_fetch_assoc($result)){
echo "ID: ".unserialize($row['test_id']).", Organization:".unserialize($row['organ']).", Designation:".unserialize($row['design']).", Start-month:".unserialize($row['start_month']).", Start-year:".unserialize($row['start_year']).", End-month:".unserialize($row['end_month']).", End-year:".unserialize($row['end_year'])."<br/>";
}
}
?>
can anyone help please
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the structure of my code. I'm really new at this and still learning, but I'm almost at the stage of giving up
need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which stylesheet a user chooses from the administration backend of a wordpress theme. The sizes of the images
Mass activity scheduling
Hi experts,
styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those. I have the relevent html but not able to come up with the css. please helpthxview plaincopy to
serializing objects - loses methods - the point being?
HiI know that serializing an object will lose the methods. But whats the point in that? What if we need the methods . Lets say the serialized string is sent from an external server where the calling
start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get there picture on the homepage. currently the box limit is 6. If you increase the limit then it
Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and longitude" for this. How we will find the these values using PHP 5.1.6. In 5.2, we can do it
urldecode question
How would I format this line of code properly?<?php echo urldecode($_GET['Title']); ?>
Error with Font and imagettfbbox
I keep getting an error that says "Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/a6079442/public_html/rebuild/includes/csi.php on line 48Error in imagettfbbox
Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?