Forum: PHP 13 Hours Ago |
| Replies: 8 Views: 121 The only problem with this is , if a user loses his interest midway [ie., after submitting 1st form], there will be a obsolete record in the table. Or else, this is good. |
Forum: PHP 13 Hours Ago |
| Replies: 8 Views: 121 You can do it in 2 simple ways (maybe there are even more, but I am not aware of it).
You can either save the data of the first form in session after it is posted, and then, when the second form is... |
Forum: PHP 13 Hours Ago |
| Replies: 3 Views: 69 What I meant was ,
function procRestSearch($searchQuery){
//Don't forget to have $searchquery defined before calling this function
$intSearchCounter = 0; //Used to set the arrays... |
Forum: PHP 15 Hours Ago |
| Replies: 3 Views: 69 Initialize the array outside the while loop. The array is getting over-written everytime it enters the loop. So you are getting only the last record.
Secondly, notices can be ignored. If you use... |
Forum: DaniWeb Community Feedback 15 Hours Ago |
| Replies: 8 Views: 149 It did for me.
FF 3.5.5 on windows XP. |
Forum: MySQL 1 Day Ago |
| Replies: 1 Views: 70 You *cannot* decrypt it. If you store sha1 of a string, while authenticating, convert the string to sha1 and compare it with the value in the table. |
Forum: PHP 1 Day Ago |
| Replies: 4 Views: 135 When the user submits the page, build your query depending upon the user's selection.
If the user has selected from_year and to_year, include that in your condition and so on. |
Forum: PHP 1 Day Ago |
| Replies: 4 Views: 135 Please be specific with your question. |
Forum: PHP 1 Day Ago |
| Replies: 2 Views: 110 The echo statement is incorrect.
echo "<a href=\"inventorid.php?inventorid=".$data2['inventorid']."\">".$data2['inventorid']." ".$data2['firstname']." ".$data2['lastname']."</a>\n";
is the... |
Forum: MySQL 1 Day Ago |
| Replies: 4 Views: 154 Ofcourse you can. But for that, you should make sure all the required fonts are installed. |
Forum: PHP 1 Day Ago |
| Replies: 4 Views: 126 Technically, it doesn't matter if you have only 1 line statement after a condition. ie.,
<?php
$x = 1;
if($x == 1)
echo "$x is valid.";
else
echo "$x is invalid";
?> |
Forum: MySQL 1 Day Ago |
| Replies: 5 Views: 112 Congrats on solving your problem. I am glad you learnt something new :)
If you post your answer, even others may get to learn something from this thread. |
Forum: MySQL 1 Day Ago |
| Replies: 4 Views: 154 Here is an example.
<html>
<body>
<ul>
<?php
for($i=65;$i<=90;$i++) {
echo "<li><a href='char.php?alpha=".chr($i)."'>".chr($i)."</a></li>";
}
?> |
Forum: MySQL 1 Day Ago |
| Replies: 5 Views: 112 Seems like you didn't read the member rules. (http://www.daniweb.com/forums/faq.php?faq=daniweb_policies)
Ch, ch. Read more on count and group by clauses. After reading them, you will be able to... |
Forum: Geeks' Lounge 1 Day Ago |
| Replies: 19 Views: 341 Hmm.. Maybe recession is a factor too. :) |
Forum: MySQL 1 Day Ago |
| Replies: 7 Views: 182 Dude, datatype as in int, varchar, date, datetime, etc.
ALTER TABLE clown_contest MODIFY COLUMN `location` varchar(40) AFTER `state`
Clear ? :) |
Forum: PHP 1 Day Ago |
| Replies: 1 Views: 95 I didn't go through so many functions in your script, but it works. You are supposed to select the options from the 2nd list before submitting. Unless you select them, they are not selected by... |
Forum: Community Introductions 1 Day Ago |
| Replies: 4 Views: 124 Welcome to Daniweb Shaun! :) |
Forum: PHP 2 Days Ago |
| Replies: 9 Views: 154 Not only echo, you will get this warning if you have session_start along with header function. Use ob_start(); as the first line of your script to turn on output buffering and ob_end_flush(); as... |
Forum: PHP 2 Days Ago |
| Replies: 3 Views: 132 Very simple.
<html>
<head>
<script type="text/javascript">
function checkCheckbox() {
var countselection = 0;
var maximumselection = 2;
var ch = document.getElementsByName('choice');
... |
Forum: PHP 2 Days Ago |
| Replies: 1 Views: 115 To get a new line, you should add a <br /> to your echo.
ie.,
<?php
echo $abbr['US']['MI']."<br />";
?>
//or simply
<?php
echo $abbr['US']['MI'];
echo "<br />"; |
Forum: PHP 2 Days Ago |
| Replies: 2 Views: 125 ob_start, as it indicates, will start output buffering. If you are using ob_start, then you should also use ob_end_flush, ie., flushing the output buffer.
I have used ob_start at places when I had... |
Forum: MySQL 2 Days Ago |
| Replies: 7 Views: 182 You forgot the datatype! (doh, even I forgot it in the syntax).
Sorry, here is the right syntax.
ALTER TABLE tablename MODIFY COLUMN columnname datatype AFTER columnname
This works for sure! |
Forum: PHP 2 Days Ago |
| Replies: 3 Views: 102 |
Forum: PHP 2 Days Ago |
| Replies: 5 Views: 109 I am glad I could help :) |
Forum: PHP 2 Days Ago |
| Replies: 3 Views: 102 :) You forgot the column name as the 2nd parameter for mysql_result.
http://php.net/manual/en/function.mysql-result.php |
Forum: PHP 2 Days Ago |
| Replies: 5 Views: 109 Condition is a mysql reserved keyword. In order to use it, you have to use ` [don't confuse it for single quote]. ie., `condition`. In my opinion, use some other word instead of condition to avoid... |
Forum: PHP 2 Days Ago |
| Replies: 15 Views: 255 Yeah, ofcourse. :) $string is just a variable name. You can give any name to a variable.
See Php naming convention here (http://www.tizag.com/phpT/variable.php). |
Forum: PHP 2 Days Ago |
| Replies: 5 Views: 109 Clear @ before mysql_query and see if it throws any error. Also, you can have $result = mysql_query($query) or die(mysql_error()); to print the error when the query fails.
P.S. @ suppresses the... |
Forum: PHP 3 Days Ago |
| Replies: 15 Views: 255 Or simply, $string = implode(",",$_POST['Prefered_Engineers']); |
Forum: PHP 3 Days Ago |
| Replies: 12 Views: 244 Hmm.. You are right! That makes sense.. |
Forum: PHP 3 Days Ago |
| Replies: 12 Views: 244 @cwarn23, I think the OP was saying, that it shows only 1 record instead of 2 !
@levsha,
Are you sure you have 2 records for that query ? If you have 2 records, it *should* display them. There is... |
Forum: Legacy and Other Languages 3 Days Ago |
| Replies: 3 Views: 169 |
Forum: MySQL 3 Days Ago |
| Replies: 7 Views: 182 Hey, sorry. I misunderstood the question.
/*
ALTER TABLE tablename MODIFY COLUMN columnname AFTER columnname
*/
Eg. ALTER TABLE members MODIFY COLUMN date_of_birth date AFTER username
... |
Forum: PHP 3 Days Ago |
| Replies: 12 Views: 244 You are supposed to put mysql_fetch_array in a while loop.
while( $data2 = mysql_fetch_array($query)) {
echo $data2['firstname'];
echo $data2['lastname'];
echo $data2['task'];
} |
Forum: MySQL 3 Days Ago |
| Replies: 7 Views: 182 Very simple.
ALTER TABLE tablename ADD columnname datatype AFTER columnname |
Forum: PHP 3 Days Ago |
| Replies: 4 Views: 134 I don't recommend using mysql_fetch_row though. This will return an array with numeric indices and the script will fail if you add a new column to your table.
I personally prefer using... |
Forum: PHP 4 Days Ago |
| Replies: 19 Views: 299 Probably you didn't get my point. I was trying to demonstrate the use of exit after header function. Even though it will throw an error, it will still print This data is supposed to be secure... .... |
Forum: Geeks' Lounge 4 Days Ago |
| Replies: 4 Views: 447 Are you a bot ? Or do you/your team copy paste the same thing in all the threads you bump once in a while ? |
Forum: PHP 4 Days Ago |
| Replies: 19 Views: 299 The exit function is used as a safety measure just in case the end user gets to echo something before header function (that will cause an error and header will not redirect).
Here is an example,
... |