Search found 236 matches

by minimihi
Sun Apr 29, 2012 9:23 am
Forum: mySQL & php coding
Topic: Trying to find a users rank
Replies: 4
Views: 852

Re: Trying to find a users rank

If 'Player 1' has 358points and 'Player 2' has 360points, will both of them have rank 3?
by minimihi
Sat Apr 28, 2012 8:14 pm
Forum: PHP coding => Mail
Topic: attachment size validation
Replies: 2
Views: 2074

Re: attachment size validation

No, your problem is PHP configuration (php.ini file).
In that file you need to change 'upload_max_filesize' value to a greater one.
By default it is set to '2M' (which is 2MB), you need to increase it
by minimihi
Sat Apr 28, 2012 7:51 pm
Forum: PHP coding => Mail
Topic: attachment size validation
Replies: 2
Views: 2074

Re: attachment size validation

"Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini."

Reference:
Handling file uploads: Error Messages Explained
by minimihi
Sat Apr 28, 2012 7:45 pm
Forum: PHP coding => Mail
Topic: attachment size validation
Replies: 2
Views: 2074

Re: attachment size validation

What is value of $_FILES['uploaded_file']['error']?
by minimihi
Sat Apr 28, 2012 6:20 pm
Forum: mySQL & php coding
Topic: creating a chain list
Replies: 2
Views: 1048

Re: creating a chain list

Here is a list <?php $database = "test"; $table = "chain_list"; $parent = "a001"; $con = mysql_connect("localhost", "root", ""); mysql_select_db($database, $con); $query = "SELECT    t1.agent_code AS lev1,    t2.agent_code AS lev2,    t3.agent_code AS lev3,    t4.agent_code AS lev4,    t5.agent_code...
by minimihi
Sat Apr 28, 2012 3:18 pm
Forum: PHP coding => General
Topic: need help with nested list code please
Replies: 0
Views: 492

Re: need help with nested list code please

Such hierarchical structure has limited depth when it comes to single selection from database Use such query SELECT t1.linkTitle AS lev1, t2.linkTitle AS lev2, t3.linkTitle AS lev3, t4.linkTitle AS lev4, t5.linkTitle AS lev5 FROM nest AS t1 LEFT JOIN nest AS t2 ON t2.parent_id = t1.id LEFT JOIN nest...
by minimihi
Sat Apr 28, 2012 2:28 pm
Forum: mySQL & php coding
Topic: Trouble with geting data
Replies: 2
Views: 546

Re: Trouble with geting data

First time you load selection result to $rows and then again, while looping through $rows you redefine it with second selection result. should be foreach ( $rows as $row ) { $theGameId = $row->gameid; $query2 = "SELECT * FROM lbzi4_jvarcade_games where id='$theGameId'"; $db->setQuery($query2); $rows...
by minimihi
Sat Apr 28, 2012 1:57 pm
Forum: PHP coding => General
Topic: PHP url questions
Replies: 0
Views: 531

Re: PHP url questions

Do you really think there would be someone so stupid who wouldn't encode content which shouldn't be known to public with md5 encoding? :?
by minimihi
Sat Apr 28, 2012 1:40 pm
Forum: PHP coding => General
Topic: How to fix header code.
Replies: 2
Views: 1593

Re: How to fix header code.

@JordanMRichards >> " I suggest you read up and learn about " template engines :D @dust233 >> That's why backups should be done :oops: In template header looks just fine. But 'body' and 'html' close tags are missing. This is bad, but I doubt it would make site unusable. If there really is something ...
by minimihi
Sat Apr 28, 2012 1:13 pm
Forum: PHP coding => General
Topic: Eventbrite user data
Replies: 5
Views: 860

Re: Eventbrite user data

Code you're using?
by minimihi
Sat Apr 28, 2012 1:08 pm
Forum: PHP coding => Mail
Topic: how can I change the echo to a email
Replies: 1
Views: 1314

Re: Invalid argument supplied for foreach

Code: Select all

...<input ... name="skills">

Code: Select all

$skill = $_POST["skill"]; 

Code: Select all

foreach ($skills as $s) { 
by minimihi
Sat Apr 28, 2012 1:00 pm
Forum: PHP coding => Images
Topic: load image as link from database
Replies: 1
Views: 2227

Re: load image as link from database

You need to have PHP code which would pass image from database to browser window by image ID/name. Link to images could look like that http://your_domain.com/image.php?id=35 Inside of image.php you would look up for image in database with 35 as ID, fetch image data, form headers for image and print ...
by minimihi
Sat Apr 28, 2012 12:54 pm
Forum: PHP General
Topic: Wikipedia API page gives me no content
Replies: 0
Views: 546

Re: Wikipedia API page gives me no content

Here is sample how it can be done

Code: Select all

<?php
$url = "http://en.wikipedia.org/wiki/Special:Export/Metallica";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_USERAGENT, "XML crawler =D please don't ban me");
$content = curl_exec($curl);
echo $content;
?>
Reference:
cURL Functions
by minimihi
Sat Apr 28, 2012 12:29 pm
Forum: PHP Scripts
Topic: write to file
Replies: 5
Views: 1729

Re: write to file

I didn't clearly understood you. If you want to put text generated by getProductList() function into $data variable. You would need to return function value to variable. Returning what is generated by function: public function getProductList () {       $output = "";       try {    //  ...          f...
by minimihi
Sat Apr 28, 2012 12:17 pm
Forum: PHP Scripts
Topic: script makes a CSV file. how create?
Replies: 5
Views: 1527

Re: script makes a CSV file. how create?

Force download? If browser supports file format, it would try to open that file in browser window. 'Force download' means that file won't be opened in browser window in any case, but instead it will be downloaded. According to above, your use of term 'force download' is weird. There is nothing smart...
by minimihi
Sat Apr 28, 2012 12:00 pm
Forum: PHP Installation
Topic: Where do I put my php file
Replies: 0
Views: 1456

Re: Where do I put my php file

You can put your files elsewhere. All you have to do is show for Apache where those files are. To do so, you need to edit Apache configuration file. You need to change 'DocumentRoot' value so that it would show where webpage files are stored. Also, if you're using Virtual Hosts, you will need to cha...
by minimihi
Sat Apr 28, 2012 9:59 am
Forum: JavaScript
Topic: auto scroll text upwards within div.
Replies: 3
Views: 2479

Re: auto scroll text upwards within div.

You want to have such feature without using JavaScript? :D
Well, go to dream about it.
by minimihi
Sat Apr 28, 2012 9:47 am
Forum: JavaScript
Topic: Javascript Validation
Replies: 2
Views: 1612

Re: Javascript Validation

To begin with, are you assigning form element value to variable?

Also

Code: Select all

if (clockIn_ + i==null || clockIn_ + i=="")
would give an error.
Check your Console to see JavaScript errors :-x even IE has it.

should be:

Code: Select all

if (('clockIn_' + i) == null || ('clockIn_' + i) == "")
by minimihi
Sat Apr 28, 2012 9:22 am
Forum: JavaScript
Topic: Web Content Display Realtime at a Time Database Updated
Replies: 1
Views: 1565

Re: Web Content Display Realtime at a Time Database Updated

You could log any changes to database in separate table. When user visits a page, make a call to PHP file via AJAX in chosen time interval. PHP file would check logs table (better check only parts which are relevant to page user sees). If anything changed on that table , generate new content and sen...
by minimihi
Fri Apr 27, 2012 2:06 am
Forum: PHP coding => General
Topic: Pagination in php - help
Replies: 0
Views: 509

Re: Pagination in php - help

You need to add some event on which a data would be set via AJAX method to PHP file.
That PHP file would generate HTML which would be added to HTML with JS.
by minimihi
Fri Apr 27, 2012 2:02 am
Forum: PHP coding => Mail
Topic: Help required regarding mail confirmation
Replies: 6
Views: 2942

Re: Help required regarding mail confirmation

Get that data from form and insert it into string :?

Seems like you trying to do something more advanced even without knowing basic of basics :?
by minimihi
Thu Apr 26, 2012 3:34 pm
Forum: PHP coding => General
Topic: How to make account page directory?
Replies: 3
Views: 731

Re: How to make account page directory?

When all pages are loaded via single file, it's much more comfortable to load page by that sample than using bunch of get parameters. All you need to do is to make a rule with htaccess and take parts from $_SERVER [ 'path_info' ] as parameters for further use. For starters you could look up " Model–...
by minimihi
Thu Apr 26, 2012 2:51 pm
Forum: PHP Scripts
Topic: PHP Menu/Submenu manageable(CMS)
Replies: 1
Views: 1140

Re: PHP Menu/Submenu manageable(CMS)

If you want just to be able to edit links, link names. You would just need to create hierarchical menu structure on database, add it's administration and change a bits of PHP code. It would be a lot of work, if you want to have multiple menu groups, don't want it be bound to static position and you ...
by minimihi
Thu Apr 26, 2012 2:18 pm
Forum: mySQL & php coding
Topic: How to retrieve highest 10 numbers
Replies: 2
Views: 952

Re: How to retrieve highest 10 numbers

You would need to order number column from highest to lowest value and select first 10 rows.

For that you should check out ORDER BY optimization and LIMIT optimization for SELECT sentence.