Search found 44 matches

by thandono
Sat Jan 28, 2012 2:00 am
Forum: JavaScript
Topic: [HELP] Cannot change color on hover after 2nd request
Replies: 1
Views: 980

Re: [HELP] Cannot change color on hover after 2nd request

OK, problem solved. I've change bind to live.

Old code:

Code: Select all

...
$('table tbody tr').bind({
...
New code:

Code: Select all

...
$('table tbody tr').live({
...
by thandono
Fri Jan 27, 2012 8:06 am
Forum: JavaScript
Topic: [HELP] Cannot change color on hover after 2nd request
Replies: 1
Views: 980

[HELP] Cannot change color on hover after 2nd request

I've got a little problem here. There's a table to display data from XML using jQuery AJAX and I want to change the text and background's color on hover and click. First time, when document ready, it requested data and received data.xml. The data displayed. The color changed. Second time, when I cli...
by thandono
Sat Jan 21, 2012 7:19 am
Forum: Server installation and configuration
Topic: Restrict user access using .htaccess
Replies: 2
Views: 2071

Re: Restrict user access using .htaccess

Ok, I found this:

Code: Select all

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST}!^127\.0\.0\.1
RewriteCond %{REQUEST_URI}!/index\.php$
RewriteRule \.html$ /index.php [R=302,L]
and I'm gonna test it
by thandono
Sat Jan 21, 2012 1:09 am
Forum: Server installation and configuration
Topic: Restrict user access using .htaccess
Replies: 2
Views: 2071

Restrict user access using .htaccess

Under the root directory, I have the following directory structure; index.php phpmyAdmin/ application_1/ application_2/ I want to restrict user access. So if not from the localhost, all users are forced to access index.php and not allowed to access all the directories (phpMyAdmin, and so on). I thin...
by thandono
Fri Jan 13, 2012 8:27 pm
Forum: PHP coding => General
Topic: How many saturdays have passed
Replies: 2
Views: 665

Re: How many saturdays have passed

Let me try this.. Today is 27th January 2012 The first Saturday of this month is 7th The difference between = 20 days Dividing 20 with 7 = 2.857, round this up = 3 So...we have passed 3 saturdays It's just lucky! So... Today is 26th February 2012 First Saturday is 4th Difference = 22 days Dividing 2...
by thandono
Fri Jan 13, 2012 1:46 am
Forum: PHP coding => General
Topic: How many saturdays have passed
Replies: 2
Views: 665

Re: How many saturdays have passed

create a function is_saturday($date) that returns true if $date is a saturday or false otherwise. then create a loop.

php.net/manual/en/function.date.php
by thandono
Fri Jan 13, 2012 1:34 am
Forum: PHP coding => General
Topic: Kayako Error
Replies: 0
Views: 455

Re: Kayako Error

Check the path
by thandono
Fri Jan 13, 2012 1:27 am
Forum: PHP coding => General
Topic: Echoing "&" in an include
Replies: 3
Views: 865

Re: Echoing "&" in an include

What about using global or session variable?
by thandono
Thu Jan 12, 2012 9:57 am
Forum: PHP coding => General
Topic: uploading pdf's only
Replies: 11
Views: 4030

Re: uploading pdf's only

Imagine if I create a text file and save it as "believe_me_this_is_a_pdf.pdf" :)
by thandono
Thu Jan 12, 2012 9:50 am
Forum: PHP coding => General
Topic: I need help to figure out what is wrong
Replies: 13
Views: 1158

Re: I need help to figure out what is wrong

1. For what is this? $anton->generatetanggal(); If you need to generate curent time, it's pretty simple: $fulldate = date('Y-m-d H:m:s', mktime()); 2. Then for your inbox page. Check again your SELECT query and code to display the result. $query = "SELECT * FROM inbox WHERE id_member=$id_member"; $r...
by thandono
Thu Jan 12, 2012 1:53 am
Forum: PHP coding => General
Topic: I need help to figure out what is wrong
Replies: 13
Views: 1158

Re: I need help to figure out what is wrong

Sore, mas... So, what you want is: 1. Get data from HTML form: - id_member (recipient) - name (sender) - subjek - pesan 2. Then calculate this data: - tgl (sending time) - alamat_ip (sender ip) 3. Execute query to retrieve records with a certain delivery time and sender ip. If the result less than 2...
by thandono
Wed Jan 11, 2012 7:28 pm
Forum: PHP coding => General
Topic: Help!?
Replies: 1
Views: 499

Re: Help!?

I think I've seen function like MM_blablabla..

This is Javascript, so if you want to change style, you can read this:
api.jquery.com/css/

Or you can change style using pure CSS (some may not work on MS IE 7 or lower):
w3school.com/css/
by thandono
Wed Jan 11, 2012 7:10 pm
Forum: mySQL & php coding
Topic: Help with Insert query
Replies: 2
Views: 777

Re: Help with Insert query

Hi,

This is your code:

Code: Select all

mysql_query("your query");
die("message");
What if we change a little:

Code: Select all

if(mysql_query("your query")) die(""message);
by thandono
Wed Jan 11, 2012 6:57 pm
Forum: mySQL & php coding
Topic: PHP - SQL Database Query Problem
Replies: 7
Views: 1505

Re: PHP - SQL Database Query Problem

Sorry for my previous post.
It should be:

$result = mysqli_query($dbc, $query);
if(!$result) die(mysqli_error($dbc));
by thandono
Wed Jan 11, 2012 2:05 pm
Forum: mySQL & php coding
Topic: PHP - SQL Database Query Problem
Replies: 7
Views: 1505

Re: PHP - SQL Database Query Problem

Code: Select all

$result = mysqli_query($dbc, $query) or die(mysqli_error($dbc));
the manual said:

Code: Select all

mixed mysqli_query ( mysqli $link , string $query [, int $resultmode ] )
string mysqli_error ( mysqli $link )
by thandono
Wed Jan 11, 2012 1:44 pm
Forum: PHP coding => General
Topic: I need help to figure out what is wrong
Replies: 13
Views: 1158

Re: I need help to figure out what is wrong

Your INSERT query (look at field id, id_member and tgl): INSERT INTO inbox (id, dari, subjek, pesan, id_member, tgl, desc, alamat_ip) VALUES (NULL, '$dari', '$subjek', '$pesan', '$fuldate', 'id_member', '-', '$ip') This is my suggestion: ID <-- BIGINT, NOT NULL, AUTO INCREMENT <-- PRIMARY KEY tgl <-...
by thandono
Tue Jan 10, 2012 9:43 pm
Forum: PHP coding => General
Topic: Update issue
Replies: 3
Views: 865

Re: Update issue

What is the problem?

dev.mysql.com/doc/refman/5.0/en/update.html
by thandono
Tue Jan 10, 2012 1:07 pm
Forum: PHP coding => General
Topic: Simple Enrollment for College Help
Replies: 4
Views: 1005

Re: Simple Enrollment for College Help

Sorry, but I'm lost since I don't know how your reg.php looks like and the error you've got.
by thandono
Mon Jan 09, 2012 10:38 am
Forum: PHP coding => General
Topic: Some Href Help
Replies: 8
Views: 1143

Re: Some Href Help

If you need to customize admin menu, why not use a plugin like AG Custom Admin or Admin Menu Editor? Sorry, my english is not so well and I don't really catch what's your 2nd problem. But I guess, you need to display a login form on your theme. Then in this (modal) form, you need to add a link (href...
by thandono
Mon Jan 09, 2012 10:13 am
Forum: PHP coding => General
Topic: Simple Enrollment for College Help
Replies: 4
Views: 1005

Re: Simple Enrollment for College Help

<?php /* I assume your table info has the following fields: - ID <---- bigint(20) unsigned NOT NULL AUTO_INCREMENT <---- PRIMARY KEY - first - last - age - cp - email - course */ $hostname = 'localhost'; $username = 'username'; $password = 'password'; $database = 'database'; // Connect to Database ...
by thandono
Mon Jan 09, 2012 9:09 am
Forum: PHP coding => General
Topic: not working
Replies: 9
Views: 1232

Re: not working

As simplypixie said, first create tables for your database using phpMyAdmin. Then... a.php <form action="b.php" method="post"> <input name="Name" type="text"/> <input name="Phone" type="text"/> <input name="Email" type="text"/> <input type="submit"/> </form> b.php <?php // Initializing variables $ho...
by thandono
Sun Jan 08, 2012 12:44 am
Forum: PHP coding => General
Topic: Help?
Replies: 8
Views: 1029

Re: Help?

I don't know much about PRIMARY KEY, UNIQUE KEY, INDEX KEY, etc. Perhaps something like this:

tbl_user:
ID (PRIMARY KEY)
user_name

tbl_awards:
ID (PRIMARY KEY)
award_name

tbl_user_award:
user_id (INDEX KEY)
award_id (INDEX KEY)
by thandono
Sun Jan 08, 2012 12:30 am
Forum: PHP coding => General
Topic: 500 Internal Server Error?
Replies: 3
Views: 808

Re: 500 Internal Server Error?

I found this:

Common reasons for 500 errors:
(1) Bad permissions, Writable by group Directories and folders should be 755.
Executable scripts within the cgi-bin folder must be 755.
Images, media, and text files like HTML should be 644.
...
by thandono
Sun Jan 08, 2012 12:15 am
Forum: PHP coding => General
Topic: Some Href Help
Replies: 8
Views: 1143

Re: Some Href Help

What about this:

<a href="#" onclick="act.go_random()">a</a>

or

<a href="javascript:void(0)" onclick="act.go_random()">a</a>