Search Results

Showing results 1 to 40 of 234
Search took 0.02 seconds.
Search: Posts Made By: darkagn ; Forum: PHP and child forums
Forum: PHP 4 Hours Ago
Replies: 5
Views: 131
Posted By darkagn
I would do this all in PHP code rather than trying to mix with PHPMyAdmin. For example,


// assumes that you have connected successfully to your database using mysql_connect and mysql_select_db...
Forum: PHP 14 Hours Ago
Replies: 5
Views: 131
Posted By darkagn
I would suggest reading up on the following functions in the PHP documentation as they will come in handy when dealing with dates:
date (http://www.php.net/manual/en/function.date.php)
strtotime...
Forum: PHP 5 Days Ago
Replies: 4
Views: 249
Posted By darkagn
This line:

$result = mysql_query("select * from presenters;");

should be:

$result = mysql_query("select * from presenters");
Forum: PHP 8 Days Ago
Replies: 1
Views: 163
Posted By darkagn
You can use single quotes to do this. Take a look at the difference between these lines of code and you will see:

$foo = "Something witty...";
$blah = "Something strange...";
$string = "$blah";...
Forum: PHP 9 Days Ago
Replies: 1
Views: 188
Posted By darkagn
You need to specify the relative path from the script calling the constructor, not from the class. For example, if your class and xml file are in the /classes folder, then you need to call $mysql =...
Forum: PHP 9 Days Ago
Replies: 5
Views: 252
Posted By darkagn
Where is $fullurl set? Also, $b[jobid] should be $b["jobid"] or $b[$jobid] depending on what you meant.
Forum: PHP 12 Days Ago
Replies: 1
Views: 177
Posted By darkagn
You could try:

if(isset($_POST["restroomsyn"]))
$restroomsyn = ($_POST["restroomsyn"]);
else
$restroomsyn = null;

Then when you are inserting use is_null to check for null and set the...
Forum: PHP 18 Days Ago
Replies: 2
Views: 178
Posted By darkagn
Not sure of the maximum size, but you may want to think about the effect of having a 1MB script on your bandwidth and website performance during peak periods.
Forum: PHP 25 Days Ago
Replies: 2
Views: 295
Posted By darkagn
Without the parameter, the printer_open function attempts to find the default printer from your php.ini settings. If it can't find them it will then use the default printer of the machine running the...
Forum: PHP 25 Days Ago
Replies: 3
Views: 377
Posted By darkagn
Thank you both for the advice, I didn't know about the function_exists function. That's a great tip :)
Forum: PHP 25 Days Ago
Replies: 3
Views: 377
Posted By darkagn
Hi all,

I have seen code of the form:

if(file_exists("foo.php")
include("foo.php");
else
include("blah.php");
Forum: PHP Nov 13th, 2009
Replies: 4
Views: 348
Posted By darkagn
Not sure if this is your problem, but I think you may need a <body> tag between your <html> and <table> tags.
Forum: PHP Nov 13th, 2009
Replies: 6
Views: 435
Posted By darkagn
Actually PHP does support the switch statement, the original poster was just using it incorrectly. A simple example of a PHP switch statement might be:

// get the mode of operation from the URL...
Forum: PHP Nov 12th, 2009
Replies: 6
Views: 435
Posted By darkagn
You can't use a switch statement like the way you are attempting. Try changing those switch statements to if-else statements and you should be fine.
Forum: PHP Nov 11th, 2009
Replies: 1
Views: 166
Posted By darkagn
There are lots of free site map generator tools out there. One of the most popular ones is Google's phpSitemapNG. Here (http://enarion.net/google/phpsitemapng/) is a link to the home website for this...
Forum: PHP Nov 11th, 2009
Replies: 3
Views: 258
Posted By darkagn
The line:

new Cite;

means that there needs to be a class called Cite, not a file called Cite.php. Even if there was a Cite class, the code in the wfCite function wouldn't need that line as it...
Forum: PHP Nov 10th, 2009
Replies: 4
Views: 290
Posted By darkagn
The call to mysql_query returns true if it is successful, false if it is not. You can therefore call it inside the condition of an if-statement. I believe you can do that in C++ too if the function...
Forum: PHP Nov 6th, 2009
Replies: 3
Views: 209
Posted By darkagn
Sorry for the late reply, I was at work and got distracted doing, well work :P Well your code looks ok to me, could it be that the problem lies in user_list.php with retrieving the $_GET["message"]...
Forum: PHP Nov 5th, 2009
Replies: 3
Views: 209
Posted By darkagn
Has your session started correctly before the call to your function? Check by echo'ing $_SESSION["Last_Page"] and make sure it's what you expect.

What error message do you generate?
Forum: PHP Oct 24th, 2009
Replies: 2
Views: 192
Posted By darkagn
Try adding the following line to your script, anywhere after the line $dir = $documentroot . '/' . $username; but not inside the function:

rmdir_r($dir);

Basically, the code inside the function...
Forum: PHP Oct 18th, 2009
Replies: 1
Views: 163
Posted By darkagn
Hi raz0r and welcome to DanoWeb :)

Not sure exactly what you are trying to do, but the rand function will give you a random number. You can read more about the rand function here...
Forum: PHP Oct 16th, 2009
Replies: 2
Views: 264
Posted By darkagn
This section is commented out:

<?
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="brijpuja1"; // Mysql password
$db_name="newsumo"; // Database name...
Forum: PHP Oct 15th, 2009
Replies: 6
Views: 857
Posted By darkagn
Hi catcoffee and welcome to DaniWeb :)

1) Can be achieved with a <input type='file'> in a PHP/HTML form. PHP then uses an array, $_POST, to retrieve all posted data and the $_FILE array to access...
Forum: PHP Oct 11th, 2009
Replies: 2
Views: 217
Posted By darkagn
From the PHP Documentation:

Try changing localhost to 127.0.0.1 and see if this fixes your problem. If not, try echo'ing mysql_error() instead of "fail" as this will give you more details as to...
Forum: PHP Oct 11th, 2009
Replies: 4
Solved: EOT With PHP
Views: 515
Posted By darkagn
Ok, so are you saying that your font doesn't work when you try to display text with PHP via an echo or print? How are you setting the font without using HTML or CSS?
Forum: PHP Oct 10th, 2009
Replies: 107
Views: 3,526
Posted By darkagn
Lots of noobs have trouble connecting to a MySQL database and running queries, displaying results etc.

Another good tutorial might describe the differences between the popular browsers such as IE,...
Forum: PHP Oct 10th, 2009
Replies: 4
Solved: EOT With PHP
Views: 515
Posted By darkagn
What does EOT mean?
Forum: PHP Sep 19th, 2009
Replies: 2
Views: 323
Posted By darkagn
Hi surf and welcome to DaniWeb :)


echo '<option value=\"$key\">$value </option>\n';

This line is your problem. Swap all ' with " and vice versa. The problem is that $value is not evaluated...
Forum: PHP Sep 19th, 2009
Replies: 11
Views: 483
Posted By darkagn
Does a window open and the problem is that it is just blank? Or does no window open at all? Truly, I can't see what's wrong with your code, the syntax looks correct, maybe try echoing $row['id']...
Forum: PHP Sep 18th, 2009
Replies: 8
Views: 349
Posted By darkagn
Yes that's right. This might help:

$results = mysql_query("SELECT a.column1, a.column2, a.column3 FROM table1 as a");
while(($nextRow = mysql_fetch_assoc($results)) !== false)
{
...
Forum: PHP Sep 18th, 2009
Replies: 8
Views: 761
Posted By darkagn
For example, with CSV file format, each row of data is a row in the csv file and each column is separated by a comma. So what you need to do is this:

// let's say the report.php file has a table...
Forum: PHP Sep 17th, 2009
Replies: 8
Views: 761
Posted By darkagn
Ok, that's what I meant from providing an export facility. From your original description I thought maybe you meant you want to convert your php source code to html or something.

So, your function...
Forum: PHP Sep 17th, 2009
Replies: 6
Views: 281
Posted By darkagn
Have you tried the DOMDocument::getElementById() function? Can you post your coding attempt with the DOM parser please?
Forum: PHP Sep 17th, 2009
Replies: 8
Views: 349
Posted By darkagn
$results is a resource that can be used to grab an array using any of the mysql_fetch functions:

while(($nextRow = mysql_fetch_assoc($results)) !== false)
{
$column1 = $nextRow["column1"];
...
Forum: PHP Sep 17th, 2009
Replies: 8
Views: 761
Posted By darkagn
Hi lcyew and welcome to DaniWeb :)

Do you mean that you want to provide an export facility, or that you need to export your source code to those formats?

To provide an export facility you need...
Forum: PHP Sep 16th, 2009
Replies: 6
Views: 281
Posted By darkagn
Hi Davros and welcome to DaniWeb :)

So are you trying to change the code that embeds the editor on the fly? If so, according to what criteria? I'm a little confused as to what you want to achieve.
Forum: PHP Sep 16th, 2009
Replies: 11
Views: 483
Posted By darkagn
Try it like this perhaps?


echo "<input type=\"image\" src=\"ViewHotel.PNG\" name=\"image\" width=\"90\" height=\"24\" onClick=\"window.open('viewhotel.php?id={$row['id']}, 'mywindow',...
Forum: PHP Sep 16th, 2009
Replies: 1
Views: 158
Posted By darkagn
Hi duckman_ca,

I'm fairly new to C# so I don't know xml.InnerText, but XML parsing in PHP is quite simple thanks to several libraries we have available. Take a look at SimpleXML or the standard...
Forum: PHP Sep 16th, 2009
Replies: 11
Views: 483
Posted By darkagn
Hmm, I can't see what's wrong there, can you post the whole line of code please? Also, what is the error message you are getting when you run the code?
Forum: PHP Sep 16th, 2009
Replies: 11
Views: 483
Posted By darkagn
Try this:

<?php
// php code here
?>
<!-- HTML code here -->
<input type='button' name='myButton' id='myButton' onClick="window.open('viewhotel.php?id=\'<?php echo $row['id'];...
Showing results 1 to 40 of 234

 


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

©2003 - 2009 DaniWeb® LLC