Forum: PHP 9 Days Ago |
| Replies: 5 Views: 248 This is wrong. Try,
$query = "SELECT * FROM Employee WHERE $method = '$search'";
$result = mysql_query($query); |
Forum: PHP 14 Days Ago |
| Replies: 14 Views: 595 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 15 Days Ago |
| Replies: 4 Views: 245 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: PHP 16 Days Ago |
| Replies: 9 Views: 271 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 16 Days Ago |
| Replies: 3 Views: 218 Very simple.
<html>
<head>
<script type="text/javascript">
function checkCheckbox() {
var countselection = 0;
var maximumselection = 2;
var ch = document.getElementsByName('choice');
... |
Forum: PHP 16 Days Ago |
| Replies: 1 Views: 243 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 17 Days Ago |
| Replies: 15 Views: 402 Or simply, $string = implode(",",$_POST['Prefered_Engineers']); |
Forum: PHP 19 Days Ago |
| Replies: 13 Views: 483 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: PHP 23 Days Ago |
| Replies: 109 Views: 3,602 Maybe the root cause for all this confusion is the word dehasher. ;) Its not exactly a dehasher, but a hash-matcher ! :icon_cool: |
Forum: PHP Oct 5th, 2009 |
| Replies: 5 Views: 257 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 Sep 14th, 2009 |
| Replies: 13 Views: 4,658 Hi! Welcome to Daniweb.. Is this what you want ?
<html>
<head>
<script type="text/javascript">
function enableButton() {
if(document.getElementById('option').checked){... |
Forum: PHP May 23rd, 2009 |
| Replies: 3 Views: 400 Source: http://in2.php.net/function.mysql-query |
Forum: PHP Apr 24th, 2009 |
| Replies: 5 Views: 356 I don't get it ! If you have the entire address in the table, why not simply use,
echo "<img src='".$row['image']."'>"; ? |
Forum: PHP Apr 24th, 2009 |
| Replies: 4 Views: 1,364 Instead of having different names for your checkboxes, use a checkbox array and on submit, loop through all the selected checkbox and insert a record to the table.
For eg.,
<form name="addcode"... |
Forum: PHP Apr 2nd, 2009 |
| Replies: 21 Views: 1,016 In all the queries, change my_db to user. :) Then I guess it should work fine! |
Forum: PHP Apr 1st, 2009 |
| Replies: 6 Views: 505 Thats strange. Because that same script showed scroll bar for me. |
Forum: PHP Apr 1st, 2009 |
| Replies: 2 Views: 488 Replace all occurance of " with ' in your message. :) |
Forum: PHP Mar 10th, 2009 |
| Replies: 5 Views: 729 @Kevin wood, Your script seems fine.
Try this.
$query = "SELECT email FROM emails";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
... |
Forum: PHP Mar 5th, 2009 |
| Replies: 4 Views: 572 header("location: index.php?variable1=".$variable1."&variable2=".$variable2);
:) |
Forum: PHP Mar 5th, 2009 |
| Replies: 5 Views: 299 table = mysql reserve keyword.
Use `table` instead. |
Forum: PHP Feb 26th, 2009 |
| Replies: 4 Views: 434 In every page you use session variables, you should have session_start(). :) |
Forum: PHP Feb 25th, 2009 |
| Replies: 109 Views: 3,602 I am good OmniX! How are you ?
I don't think there is any decrypting script/function which you can download. They have mentioned how there can be a collision between 2 different strings giving... |
Forum: PHP Feb 25th, 2009 |
| Replies: 4 Views: 392 This must be
In your example, you are checking if variable filename value is NULL or FALSE (which is wrong). And, you should use logical operator "and" instead of "or". |
Forum: PHP Feb 12th, 2009 |
| Replies: 6 Views: 409 @Rhyan, \n will return extra line breaks. For example, If the actual string is
ab
bc
\n will return
ab
bc |
Forum: PHP Feb 5th, 2009 |
| Replies: 8 Views: 499 Umm.. Yeah, well, almost.. This looks good except the part where you insert string values to a varchar column of the table. Strings should be wrapped in ' single quotes.. So, pass the values... |
Forum: PHP Jul 30th, 2008 |
| Replies: 2 Views: 865 Because you are using mysql_fetch_row and trying to use the associated name. Use mysql_fetch_array instead. |
Forum: PHP Jul 26th, 2008 |
| Replies: 3 Views: 578 I am not sure if you can do that using joins. Join returns all the records which matches the condition. So, there is no way to find out which advertiser belongs to which category.
$query = "select... |
Forum: PHP Jul 26th, 2008 |
| Replies: 11 Views: 690 Yap ! Change function name "final" to "finally" or something ! |
Forum: PHP Jul 25th, 2008 |
| Replies: 18 Views: 1,201 <?php
if(isset($_POST['check'])) {
$host="localhost";
$user="";
$pass="";
$dbid="upload";
$link=mysql_connect($host,$user,$pass);
mysql_select_db($dbid);
$name =... |
Forum: PHP Jul 17th, 2008 |
| Replies: 3 Views: 556 Yep! it seems like a tough job for me! |
Forum: PHP Jul 14th, 2008 |
| Replies: 4 Views: 2,310 Eg. test1.php
<?php
session_start();
$array = array();
for($i=0;$i<5;$i++) {
$array[] = $i; //insert $i to an array
}
$_SESSION['array'] = $array; //assign $array to the session variable... |
Forum: PHP Jul 11th, 2008 |
| Replies: 14 Views: 1,148 Then maybe something is wrong with your query.
I tried it and it worked !
SELECT uname,datej,curdate(),(YEAR(curdate())-YEAR(datej))-(RIGHT(curdate(),5)<RIGHT(datej,5)) AS age FROM members... |
Forum: PHP Jul 11th, 2008 |
| Replies: 8 Views: 1,974 A simple example.
<?php
$file="test.xls";
$test="<table border=1><tr><td>Cell 1</td><td>Cell 2</td></tr></table>";
header("Content-type: application/vnd.ms-excel");... |
Forum: PHP Jul 9th, 2008 |
| Replies: 20 Views: 1,391 That is simply not possible. Oh, it is possible if everyone starts using static IP. You can log the IP in a table and cross check whenever a user tries to create an account. (Mind you, Its possible... |
Forum: PHP Jul 8th, 2008 |
| Replies: 10 Views: 2,292 mysql_connect error is because the user gave wrong credentials to connect to the database.
Its not possible to call a php function or a mysql query with "onclick" event. As others have mentioned... |
Forum: PHP Jul 5th, 2008 |
| Replies: 10 Views: 1,703 Well, Thats because,
$_SESSION['getdisplayname']=$displayname;
is being set after you include/require outlineget.php . That is, $_SESSION['getdisplayname'] is empty on the first run. So,... |
Forum: PHP Jul 2nd, 2008 |
| Replies: 5 Views: 495 http://w3schools.com/php/php_intro.asp :) |
Forum: PHP Jul 1st, 2008 |
| Replies: 34 Views: 2,145 It doesn't matter if you have functions in a separate file and include it in the executing script.
Aaarghhhh ! :@ Do this.. I found the error !
function executequery($query) {
$x =... |
Forum: PHP Jun 30th, 2008 |
| Replies: 14 Views: 1,919 No.. You are creating an alias for SUBSTRING_INDEX(tip, ' ',8) . Php parser will look for a column name and since you aren't specifying any, it will be empty.
This will return the result under... |
Forum: PHP Jun 25th, 2008 |
| Replies: 34 Views: 2,145 As I have shown you in my example, where I am assigning $row['name'] to $array (which is an array), you can do the same !
You can do,
function fetchAssoc($sql) {
$array = array();
while($row... |