I have created a string from an array. I have inserted commas from my form values. I am trying to remove the last comma from the string and can't seem to remove it. I have tried chop, rtrim, substr, substr_remove, trim and none of them seem to remove the last comma. $sql_meeting2 = "SELECT * FROM meeting WHERE location_id = '$location_id' ORDER BY day_id";
$result_meeting2 = mysql_query($sql_meeting2) or die(mysql_error());
while($data_meeting2 = mysql_fetch_array($result_meeting2)){
$day = $data_meeting2['day'];
$times = $data_meeting2['time'];
$open = $data_meeting2['open'];
$format = $data_meeting2['format'];
$format is the string I am trying to rtrim from.
This is my form codeCode: <td style="padding-left:15px;">
<input type="checkbox" name="format[]" value="Discussion,">Discussion<br />
<input type="checkbox" name="format[]" value="Basic Text Study,">Basic Text Study<br />
<input type="checkbox" name="format[]" value="It Works Study,">It Works Study<br />
<input type="checkbox" name="format[]" value="IP Study,">IP Study<br />
<input type="checkbox" name="format[]" value="Topic,">Topic<br />
<input type="checkbox" name="format[]" value="Candlelight,">Candlelight<br />
<input type="checkbox" name="format[]" value="Speaker,">Speaker<br />
<input type="checkbox" name="format[]" value="Birthday,">Birthday<br />
<input type="checkbox" name="format[]" value="Men,">Men<br />
<input type="checkbox" name="format[]" value="Women,">Women<br />
<input type="checkbox" name="format[]" value="Varies,">Varies<br />
<input type="checkbox" name="format[]" value="Other">Other
</td></tr>I have manipulated this form information with this:
$formats = $_POST['format'];
$format = implode(' ',$formats);
Can anyone help?
question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or should i always put a die() function underneath the header() function?
Batch Related Pricing
Hi, I need some clarity on the batch related pricing
removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0mdsb2JgbA9ECgR8GgMfWSpVL2ljb24vMC84MDAwIAABAAAAAP3Wg70=.jpg"but for some reason it is breaking
duplicate record notification
In my database, after insertion of records, I want to know if the record inserted is duplicate or not. How can I do this ??
CURL XML Request [From C to PHP]
Hi, I need some help converting this into something that will work with PHP.Code:
Need help adding a timestamp to my filename/variable
Hello, I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a form/php setup that allows a user to upload an image to my server. The upload is working well, and the code
Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system ( I got a feeling this is gonna be difficult, VERY )The idea is that i create txt / csv file with
getting Vars to pass to next page.
Hello all, I have a confusing situation on my hands, i am a member of a gaming community and we are setting up a website (yay i get to be teh techie!!) im not exactly a noob with php but i am by far
Display last record first.
I need some help how put the last record first and first record last.ThanksCode: <?phpinclude("connect.php");$query="SELECT * FROM MyNotes ";$result=mysql_query($query);$num
Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!I've got a MySQL database setup with a table that has multiple fields, where one is a numerical