Forum: PHP 13 Days Ago |
| Replies: 15 Views: 375 you could also make a function out of it
<?php
function arrayToString($array) {
$string = '';
foreach($array as $value) {
$string .= "{$string}, {$value} ";
}... |
Forum: PHP 13 Days Ago |
| Replies: 15 Views: 375 Oh i see...
<?php
$string = '';
$engineers = $_POST['Prefered_Engineers'];
foreach($engineers as $engineer) {
$string .= "{$string}, {$engineer} ";
}
?> |
Forum: PHP 13 Days Ago |
| Replies: 15 Views: 375 apologies the function was a demonstration of how to access the the values in the array. you can use the same function to perform other actions, such as send the values to the data base. It will... |
Forum: PHP 13 Days Ago |
| Replies: 15 Views: 375 It happens to the best of us ;) |
Forum: PHP 13 Days Ago |
| Replies: 15 Views: 375 As much as I try and aviod overposting more experienced and respected posters, if you remove the [] that will only let you select 1 of the checkboxes and not multiple. If you want multiple You need... |
Forum: PHP 14 Days Ago |
| Replies: 19 Views: 465 I'm sure you dont want to cuase an infinite loop. What are you trying to do? |
Forum: PHP 14 Days Ago |
| Replies: 4 Views: 245 the concatenation full stops seem to be inside the string. try this:
$data = "UPDATE inventors SET month='$month',day='$day', year='$year', date='$year" . "-" . "$month" . "-" . "$day' WHERE... |
Forum: PHP 15 Days Ago |
| Replies: 4 Views: 207 They are normaly done in HTML.
<html>
<body>
<select name="menu">
<option value="opt1">Option 1</option>
<option value="opt2">Option 2</option>
<option... |
Forum: PHP 16 Days Ago |
| Replies: 13 Views: 459 There has recently been a post (http://www.daniweb.com/forums/post1046864.html#post1046864) similar to yours and I don't believe you can use the switch statements like that. change them to if/elseif... |
Forum: PHP 18 Days Ago |
| Replies: 6 Views: 332 Are you talking about having inputs of a function that may not be used but could be?
example
<?php
function doStuff($a='not set', $b='not set', $c='not set') {
echo $a. "<br />";
... |
Forum: PHP 20 Days Ago |
| Replies: 4 Views: 218 I take it you are also using ob_end_flush() at the end? |
Forum: PHP 21 Days Ago |
| Replies: 2 Views: 213 is the file sql_Conn.php in the same directory as the file you are including it from? Also check that you have not inadvertantly made an error in the filename of the physical file in the directory. 1... |
Forum: PHP Oct 19th, 2009 |
| Replies: 4 Views: 274 which part are you having issues with? The use of sha1() or the sql to change the password?
Post your change password script if you have one |
Forum: PHP Aug 26th, 2009 |
| Replies: 7 Views: 311 never mind you posted that while i was writing that. sorry |
Forum: PHP Aug 26th, 2009 |
| Replies: 7 Views: 311 try using str_replace
<?php
$source = "string with • ";
$newString = str_replace("•", "", $source);
that should work |
Forum: PHP Jul 21st, 2009 |
| Replies: 12 Views: 697 This is a fantastic site, i learned a lot from this one |
Forum: PHP Jul 21st, 2009 |
| Replies: 12 Views: 697 PHP can do nearly anything you want it to do so you won’t be sorry you chose PHP. I am only new to the language, and to Programming in general.
From what I have seen and heard using HTML, PHP and... |
Forum: PHP Jul 19th, 2009 |
| Replies: 4 Views: 344 incorrect code - will repost |
Forum: PHP May 26th, 2009 |
| Replies: 13 Views: 434 |
Forum: PHP May 26th, 2009 |
| Replies: 13 Views: 434 I am a little confused? This code is different to your origional question? did you solve that issue? |
Forum: PHP May 26th, 2009 |
| Replies: 3 Views: 191 Sounds link you want to update existing data.
If you are updating chane "INSERT" to "UPDATE and remove INTO e.g
$sql= UPDATE customer SET sizeindustry = '$sindustry' WHERE sno = '$sno' limit... |
Forum: PHP May 25th, 2009 |
| Replies: 13 Views: 434 I was having a similar issue the other day, but my situation was a little different. have you tried ob_start(); and ob_end_flush();?
Try putting ob_start(); athe the start of the page and... |