No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
17 Posted Topics
When I insert a new event into the table, I serialize almost all the data except a few fields I needed to keep separate. Here is what my serialization looks like in the database: The field this data is stored in is called host_array: [CODE] a:16:{s:5:"sport";s:8:"football";s:14:"tournamentname";s:21:"Grid Iron Challenge 2";s:11:"sanctioning";s:7:"Testing";s:4:"age1";s:2:"15";s:4:"age2";s:2:"16";s:4:"cost";s:3:"450";s:5:"sdate";s:10:"2010-03-05";s:5:"edate";s:10:"2010-03-10";s:5:"tcity";s:5:"Wayne";s:6:"tstate";s:2:"MI";s:5:"games";s:1:"5";s:13:"teamsaccepted";s:2:"15";s:16:"pslteamsaccepted";s:1:"5";s:6:"hotels";s:6:"Hotels";s:7:"details";s:7:"Details";s:6:"button";s:8:"Continue";} [/CODE] … | |
This is how my session reads: [CODE] Array ( [pstloggedin] => blah [userID] => blah [email] => blah [fname] => blah [lname] => blah [phone] => blah [cart] => Array ( [0] => Array ( [team] => 2137 [tournament] => 24577 [gatefee] => yes [cost] => 800 [sdate] => 2010-06-03 … | |
I am running this foreach loop. I need to seperate each value by a comma, which this does. However, I need to kill the comma on the last value. [code] foreach ($_POST as $key=>$value){ if ($key != "submit" && $key != "type"){ $fields = $key.","; echo $fields; } } [/code] … | |
I am trying to group a list of event dates by their ending date. So if I have 15 events that end on the same date, I want all of those tr bgcolors to be red, then the next group, lets say 8 events all end on the same date, … | |
Re: <?php //edit this $_max_file_size = '3000000'; //file size in bytes. $upload_dir = "somefolder/"; //upload folder..chmod to 777 $_i = "1"; //number of files to upload at one time //end edit echo "<table width=100% border=0 cellpadding=0 cellspacing=0>"; echo "<form enctype='multipart/form-data' action='?do=upload' method='post' style=\"margin: 0px;\">"; echo "<tr><td><input type='hidden' name='MAX_FILE_SIZE' value='" . $_max_file_size … | |
Re: I normally see this error when a ' is added in the data that is being submitted to the DB. Try addslashes($var); and stripslashes($var); | |
I have a feed for UPS that gets real time shipping costs for packages shipped throughout the US. The feed works fine, except if someone enters AE or AP as the state if they are shipping to a military base overseas. I get this error: 111286:AE is not a valid … | |
A user will select a tournament to register for, then add a team, then I store the following into a session: $teamID; $tournyID; $gatefee; $cost; When they click add to cart I update the session using this: $_SESSION['cart'][]['team'] = $teamID; $_SESSION['cart'][]['tournament'] = $tournyID; $_SESSION['cart'][]['gatefee'] = $gatefee; $_SESSION['cart'][]['cost'] = $cost; My … | |
I ask the user how many players are on their roster and they select the answer from a drop down menu, click submit and it generates 1 roster spot for the amout of players they selected. Here is this code: $players comes from the number they selected above. $players = … | |
Can anyone tell me how to write a PHP script to update this shell command? /usr/local/psa/bin/domain.sh -u domain.com -passwd password I am trying to update FTP passwords using a PHP script, in place of logging into Plesk everyday to change an FTP password. I have a web based tool that … | |
I am using current_timestamp and it works great but when I output the data onto a php page it looks like this: 2008-03-05 18:05:44 Anyone know how I can make it look like this? 03-05-2008 18:05:44 | |
Can someone please take a look at this and help me do one thing? I am uploading images to a directory and updating the users record with the photo they upload. Problem is, I could have someone upload a photo with the same name as a photo that is already … | |
I spit out 4 photos across the screen, then I want to start a new row of the next 4 photos, then so on until done. This works fine expcet the first row shows only 3, then it goes to 4 across. Can someone help? <?php $ln = $_POST['lastname']; $ps … | |
I am using the following query to pull categories from the DB then creating a select list. Can some tell me how to make the current value selected in the list when they open the category? <?php include("mysql.php"); $queryc = "select * from tbl_category WHERE active = 'yes' ORDER by … | |
I am building a search tool to allow users to search players by the following criteria: Last Name: Sport: Graduation Year: City: State: Gender: Here is my query after the post. $ln = $_POST['lastname']; $ps = $_POST['primarysport']; $yg = $_POST['yeargraduate']; $cy = $_POST['city']; $st = $_POST['state']; $gn = $_POST['gender']; include('admin/mysql.php'); … | |
Any one know how I can write a php statement to call the last 4 entires from tbl_accounts by userID? Example: I have 4 users, userID's 1,2,3and 4. All of these users are showing on the home page. When user #5 signs up, I want user 1 to fall off … | |
Can someone tell me why this would cause the following error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource <?php $un = $_POST['email']; $pw = $_POST['password']; include("../admin/mysql.php"); $query = "select * from tbl_accounts WHERE $un = email AND $pw = password"; $result = mysql_query($query); $row = mysql_fetch_array($result); … |
The End.