Search Results

Showing results 1 to 40 of 973
Search took 0.07 seconds.
Search: Posts Made By: nav33n
Forum: PHP 16 Days Ago
Replies: 4
Solved: date() question
Views: 261
Posted By nav33n
Pass $row['date'] as a parameter to this date function and return the changed value.
Eg.

function changeDate($date) {
$newdate = date('d/n/y',strtotime($date));
return $newdate;
}

Call...
Forum: PHP 24 Days Ago
Replies: 5
Views: 328
Posted By nav33n
Great :) Cheers!
Forum: PHP 24 Days Ago
Replies: 5
Views: 328
Posted By nav33n
This is wrong. Try,

$query = "SELECT * FROM Employee WHERE $method = '$search'";
$result = mysql_query($query);
Forum: PHP 29 Days Ago
Replies: 14
Views: 681
Posted By nav33n
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 29 Days Ago
Replies: 14
Views: 681
Posted By nav33n
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 30 Days Ago
Replies: 2
Views: 268
Posted By nav33n
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 30 Days Ago
Replies: 5
Views: 482
Posted By nav33n
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 30 Days Ago
Replies: 5
Views: 482
Posted By nav33n
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: MySQL 30 Days Ago
Replies: 9
Views: 629
Posted By nav33n
Dude, datatype as in int, varchar, date, datetime, etc.

ALTER TABLE clown_contest MODIFY COLUMN `location` varchar(40) AFTER `state`

Clear ? :)
Forum: MySQL 31 Days Ago
Replies: 9
Views: 629
Posted By nav33n
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 31 Days Ago
Replies: 3
Solved: Help Me Out!!!
Views: 347
Posted By nav33n
:) You forgot the column name as the 2nd parameter for mysql_result.
http://php.net/manual/en/function.mysql-result.php
Forum: PHP 31 Days Ago
Replies: 5
Views: 308
Posted By nav33n
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 31 Days Ago
Replies: 15
Views: 436
Posted By nav33n
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 31 Days Ago
Replies: 5
Views: 308
Posted By nav33n
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 31 Days Ago
Replies: 15
Views: 436
Posted By nav33n
Or simply, $string = implode(",",$_POST['Prefered_Engineers']);
Forum: PHP 32 Days Ago
Replies: 12
Solved: Echo array
Views: 457
Posted By nav33n
Hmm.. You are right! That makes sense..
Forum: PHP 32 Days Ago
Replies: 12
Solved: Echo array
Views: 457
Posted By nav33n
@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: MySQL 32 Days Ago
Replies: 9
Views: 629
Posted By nav33n
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 32 Days Ago
Replies: 12
Solved: Echo array
Views: 457
Posted By nav33n
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 32 Days Ago
Replies: 9
Views: 629
Posted By nav33n
Very simple.

ALTER TABLE tablename ADD columnname datatype AFTER columnname
Forum: PHP 32 Days Ago
Replies: 4
Views: 266
Posted By nav33n
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 32 Days Ago
Replies: 19
Solved: auto refresh
Views: 577
Posted By nav33n
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: PHP 32 Days Ago
Replies: 19
Solved: auto refresh
Views: 577
Posted By nav33n
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,
...
Forum: PHP 33 Days Ago
Replies: 13
Views: 529
Posted By nav33n
There are still some typos. $GET_['formfield'] instead of $_GET['formfield']. One simple suggestion though. You don't need a switch/if-elseif-else condition to find out the day. A simple array will...
Forum: MySQL Nov 5th, 2009
Replies: 4
Views: 536
Posted By nav33n
Hi, can you elaborate your question ?
If you are inserting the value to the table from php, you can use substr (http://php.net/manual/en/function.substr.php) to insert only a part of a string. If...
Forum: PHP Oct 6th, 2009
Replies: 4
Views: 875
Posted By nav33n
Pretty simple. Fetch the data from the database and place it between <textarea> tags. Here is an example.

<?php
if(isset($_POST['save'])) {
print "<pre>";
print_r($_POST);
print "</pre>";...
Forum: PHP Oct 5th, 2009
Replies: 5
Views: 265
Posted By nav33n
Instead of storing the password just like a normal string, save it as an encrypted string, using SHA1 or something. This will provide you more security as well as solves your issue.
Here is an...
Forum: PHP Aug 25th, 2009
Replies: 4
Views: 561
Posted By nav33n
What is the problem ? You would be selecting CourseName and courseID. So, when you post the form, You will have "MATHS" in $_POST['CourseName'] and "101" in $_POST['courseID']. Then it is all about...
Forum: PHP Aug 25th, 2009
Replies: 19
Views: 617
Posted By nav33n
:) Thanks for waking me up. That is absolutely right.
Forum: PHP Aug 25th, 2009
Replies: 19
Views: 617
Posted By nav33n
Can you post your code ? (and print the variable $sql and post it here ?)
I guess the variable $table is empty or something.
Forum: PHP Aug 25th, 2009
Replies: 6
Views: 448
Posted By nav33n
:) Wohoo! Good luck..
Forum: PHP Aug 25th, 2009
Replies: 19
Views: 617
Posted By nav33n
Are you using Linux server ? If yes, then make sure to check the case (lowercase/uppercase) of table and column names. Linux is case-sensitive. :)
Did you try printing out the query and executing...
Forum: PHP Aug 25th, 2009
Replies: 6
Views: 448
Posted By nav33n
Hmm.. I tried your code snippet and it worked fine. There is one thing that I'd always do after having a header, an exit. This might or might not fix the problem, but try having an exit after...
Forum: PHP Aug 25th, 2009
Replies: 6
Views: 448
Posted By nav33n
Try <?php ob_start(); ?> to turn on output buffering (should be the 1st line of your code) and <?php ob_flush(); ?> as the last line to flush the buffered output.
Forum: PHP Aug 25th, 2009
Replies: 19
Views: 617
Posted By nav33n
1. Do you have mysql_connect ?
2. Are you selecting the database ?
3. Does that table exist ?
4. Are you sure the query is correct ? Ie., echo the query and test it in phpmyadmin/mysql console. ...
Forum: PHP Jul 29th, 2009
Replies: 5
Views: 319
Posted By nav33n
Ah! I see.. Happy learning :) Cheers!
Forum: PHP Jul 29th, 2009
Replies: 5
Views: 319
Posted By nav33n
<label>Content: <textarea name="Content" /><?php echo $row['Content'];?></textarea></label><br />

Pretty simple ? eh ? :)
Forum: PHP Jul 29th, 2009
Replies: 12
Views: 1,247
Posted By nav33n
http://www.tizag.com/mysqlTutorial/mysqlfetcharray.php
You should use the array returned by mysql_fetch_array and not the result resource itself. ie., $row['content'], $row['name'] etc and not...
Forum: Geeks' Lounge Jul 24th, 2009
Replies: 22
Solved: indian invasion
Views: 1,138
Posted By nav33n
Ah, It seems like you {haven't met/have no idea about} Daniweb's hardcore stalker with a never die attitude yet ? ;)
Forum: Geeks' Lounge Jul 23rd, 2009
Replies: 22
Solved: indian invasion
Views: 1,138
Posted By nav33n
You must have worked with the wrong 'set' of people for that bad experience. This has never happened to me (I have been working for past 3 yrs).
Isn't the sentence in bold a good thing ? Who...
Showing results 1 to 40 of 973

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC