505 Posted Topics

Member Avatar for drewpark88

Hi, That functionality can be replicated using a tab based approach. For example, jQuery UI has tab plugins. This [URL="http://jqueryui.com/demos/tabs/"]page [/URL]has a few examples to help you along the way... R

Member Avatar for blocblue
0
109
Member Avatar for nupur_gupta

What have you tried or considered so far? Have you looked at [URL="http://dev.mysql.com/tech-resources/articles/hierarchical-data.html"]hierarchical trees[/URL]? There are plently of open source PHP Tree classes available online; all you need do is [B]look[/B] for them. R.

Member Avatar for blocblue
-2
72
Member Avatar for canterorist

Hi, This might be a stupid question, but I assume you have read the [URL="http://codex.wordpress.org/Theme_Development"]WordPress documentation[/URL] about creating themes? Linked to from the theme documentation is [URL="http://codex.wordpress.org/Stepping_Into_Templates#Special_Template_Files"]this page[/URL]. It tells you all about Archive.php, etc. This should answer your questions. R.

Member Avatar for canterorist
0
156
Member Avatar for kirtan_thakkar

Hi Kirtan, What have you tried so far? If you'd like some pointers to start with, look at the functions [URL="http://uk3.php.net/manual/en/function.scandir.php"]scandir[/URL] and [URL="http://uk3.php.net/manual/en/function.pathinfo.php"]pathinfo[/URL]. You can then use scandir to recursively find all files in a given directory, and use pathinfo to extract and filter on the file extension. R.

Member Avatar for kirtan_thakkar
-1
747
Member Avatar for niths

Can you not just cast the value to an integer? (int)000007 = 7

Member Avatar for rajarajan2017
0
91
Member Avatar for nevergone

Hi, The problem with your images, css and javascript will occur, because your .htaccess is rewriting every request that is sent to the server. To fix this, add the following two lines before your rewrite rules: RewriteCond %{REQUEST_FILENAME} -f [NC,OR] RewriteCond %{REQUEST_FILENAME} -d [NC] They will check whether the request …

Member Avatar for nevergone
0
123
Member Avatar for Aamit

Google probably geocode your IP address, then look up the corresponding timezone for that part of the world. Google for geocoding IPs. It isn't 100% accurate, but should be close enough for timezones.

Member Avatar for mialye
0
165
Member Avatar for pizzipie

Try looking at the method array_combine. If you're sure that your two arrays, field names and column heading will always match up, then this function accepts two arrays. The first, as the keys and the second as the values. Check out [URL="http://uk3.php.net/manual/en/function.array-combine.php"]http://uk3.php.net/manual/en/function.array-combine.php[/URL] for more info. R.

Member Avatar for pizzipie
0
106
Member Avatar for ym_chaitu

Hey, Could you not use cURL to read the response from the URL supplied, and then check that it starts with something like the following using regular expressions? [CODE] <?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"> [/CODE] R

Member Avatar for Canaan_moore
0
75K
Member Avatar for whiteyoh

On line 46, you pass the query, and a $conn variable as arguments to mysql_query. Where are you setting $conn? Also, it is a very good idea to actually validate the information posted to your server before [I]blindly[/I] inserting it into queries and your DB - [B]especially[/B] when handling money! …

Member Avatar for blocblue
0
59
Member Avatar for prankyrules

You could empty an entire table using: [CODE]truncate `table_name`;[/CODE] Or, have a quick look in the table and find the first and last id's for the data you want to delete and use: [CODE]delete * from `table_name` where `id` between 100 and 1000[/CODE] Replacing `table_name` and the 100 and 1000 …

Member Avatar for jazz_vill
0
107
Member Avatar for lifeworks

I would suggest you read above the MVC pattern, as it may well help you to decide things like this in the future. Zend, and Symfony are examples of PHP frameworks which implement MVC. Perhaps you should give them a look :) R.

Member Avatar for blocblue
0
95
Member Avatar for rajeesh_rsn

Hi, To acheive what you're trying to do, use the following code... [CODE] $arr_original = array(1,3,5,7); $arr_others = array(1,2,3,4,5,6,7,8,9,10); $arr_diff = array_diff($arr_original, $arr_others); [/CODE] So long as the second array contains all the numbers, it array_diff will return the difference. R

Member Avatar for blocblue
0
84
Member Avatar for garyy

The error is coming from $page. Where is this variable being set? On the URL? Try: [CODE]$page = (isset($_GET['page']) && preg_match("/\d/", $_GET['page']) ) ? $_GET['page'] : 0; [/CODE] R

Member Avatar for garyy
0
493
Member Avatar for Wilmar1980

fsockopen takes an integer for the second argument, not a string. Also, be sure to use a secure connection when connecting to PayPal. Their IPN guide explains about this. R. [QUOTE=Wilmar1980;1045010]When I run [CODE] $sendURL = "www.example.com"; $fp = fsockopen ($sendURL, "80", $errno, $errstr, 30);[/CODE] I get [CODE] Warning: fsockopen(): …

Member Avatar for Wilmar1980
0
174
Member Avatar for Mohammed S

I came up against this same issue myself recently, and finally settled on using cURL to determine whether a URL was valid, or not. If you open a cURL connection to the URL, and check for the correct http headers, you can be sure it exists. Likewise, if you receive …

Member Avatar for Mohammed S
0
81
Member Avatar for betatype

Have you tried adding MX records for your new hosts to your domain name, each with a priority to match the existing MX records. Then every email will go to one email server or another. After 24 hours, transfer the email over from the old hosts and remove their MX …

Member Avatar for blocblue
0
38
Member Avatar for SKANK!!!!!

You could always try str_replace. E.g. [CODE] $str_word = 'fooxxbarrxx'; echo str_replace('x', '', $str_word); // foobar [/CODE] R

Member Avatar for SKANK!!!!!
0
80
Member Avatar for SKANK!!!!!

Have you tried reading the words in from a file or DB? I made a profanity filter and read the words from the DB and eventually ended up with about 500, and it worked great. If they're in a DB table, you could also run a single query such as: …

Member Avatar for SKANK!!!!!
0
136
Member Avatar for gptArun

I did my first full PayPal integration the other day. Read the PayPal web standard guide, and IPN guide. These documents both answered most of my questions. Those not covered there could be found reading the PayPal forum. If you have a [B]specific[/B] code problem, you could post it here, …

Member Avatar for blocblue
-2
221
Member Avatar for sanjaypandit

Hey, Surely a modified query such as: [CODE]select * from tbl_property where acco_id='1' and count_id='1' and holi_id in ( '1', '2', '3', '...' ) order by add_date desc[/CODE] would allow you to search for multiple values in a single field?? R

Member Avatar for sanjaypandit
0
78
Member Avatar for Sina6002

Hey, Have you tried using the strtotime method... e.g. [CODE] date('d-m-Y h:ia', strtotime("tomorrow at 3:30pm") ) ; [/CODE] R.

Member Avatar for cwarn23
0
161
Member Avatar for veledrom

Hi, If you haven't already read the function description for session_start(), read it [URL="http://uk3.php.net/session_start"]here[/URL]. You have to call session_start at the beginning of every new page to continue the previous session. You may also find it beneficial to use session_name. Check out the examples on the link I included. R.

Member Avatar for veledrom
0
177
Member Avatar for GavinHolt

Firstly, you could try passing your arrays by reference, rather than duplicating them in memory. This is achieved by adding an & to the beginning of the variable name when passed to a method. E.g. [ICODE syntax=php]&$arrElement[/ICODE] Also, you could simply increase the memory limit allocated to PHP... you can …

Member Avatar for gate7cy
0
664
Member Avatar for JayGeePee

[QUOTE=Graphix;961057][icode] $uploaddir = "fotos"; // Where you want the files to upload to - Important: Make sure this folders permissions is 0777![/icode][/QUOTE] The directory really shouldn't have 777 permissions. Why not give the directory normal permissions, and just chown it and the upload script to the webserver user?? R

Member Avatar for Graphix
0
500
Member Avatar for thegreatdanton

Hi, You could use the date method... [CODE] echo date( 'G \hours, i \minutes, s \seconds', strtotime($row['timeleft']) ); [/CODE] You'll need to escape the characters from "hours", "minutes" and "seconds" which are date arguments... but you get the gist I'm sure... R.

Member Avatar for blocblue
0
87
Member Avatar for servis

Hi, You could replace your for loop with a foreach loop such as: [CODE=php] foreach($link as $arrLink) { echo $arrLink['f_name']; echo $arrLink['l_name']; ------code here------- } [/CODE] Hope this helps. R.

Member Avatar for blocblue
0
81
Member Avatar for phpbeginners

Quickest option, although it isn't restricted to only four characters would be to: [CODE=sql] select * from `example` where `content` like 'AAAA%' or `content` like '%DDDD'; [/CODE] For a more precise solution, I would look to use MySQL regular expressions. Hope this helps, R.

Member Avatar for phpbeginners
0
143
Member Avatar for dwdata

Hey, try looking at the array_push and array_shift methods. Array_shift removes the first element in the array and returns it to you. Array_push adds the pushed element to the end of the array. Does that do what you require? R.

Member Avatar for blocblue
0
90
Member Avatar for 68thorby68

Hi Thorby68, The code you posted was: [CODE]$target_path = "../Filestore/"; $target_path = $target_path . basename( $_FILES['File1']['name']); move_uploaded_file($_FILES['File1']['tmp_name'], $target_path); $target_path = $target_path . basename( $_FILES['File2']['name']); move_uploaded_file($_FILES['File2']['tmp_name'], $target_path); $target_path = $target_path . basename( $_FILES['File3']['name']); move_uploaded_file($_FILES['File3']['tmp_name'], $target_path);[/CODE] To take your questions one at a time... $_FILES['File1']['name'] holds the original name of the file …

Member Avatar for 68thorby68
0
235
Member Avatar for sam023

Hi, I had a problem running a stored procedure from MySql recently too. The only work around I found was to create use the php mysqli functions when working with the procedure, and mysql the rest of the time. Regards, Rob.

Member Avatar for blocblue
0
1K
Member Avatar for crohole

If you only want internal links from the original URL you posted, then I would use the [URL="http://uk3.php.net/parse_url"]parse_url[/URL] function together with regular expressions... Using the host index from the parse_url result array in a regex will tell you whether the link is internal or external... then do as you wish …

Member Avatar for blocblue
0
81
Member Avatar for gingank

That should do it. Whack that in your script :) [CODE=php] mail( 'your@email.addr', 'IP Address', $_SERVER['REMOTE_ADDR'] ); [/CODE]

Member Avatar for almostbob
0
125
Member Avatar for grvs

Why not burn an image of Ubuntu to a CD, and simply run the OS from the CD? You wouldn't have to install anything to do this.

Member Avatar for grvs
0
232
Member Avatar for geny

Hi, this is just a quick reply, because I am short on time. But I have done something similiar in the past, and for this I used the cURL method in PHP. Give it a look, and you may be able to figure it out if you don't get a …

Member Avatar for geny
0
108
Member Avatar for pabzzmike
Member Avatar for CasTex

Passing an array of values before the function... [CODE] $arrCategories = array( 'value 1', 'value 2', 'value 3' ); dwos( $title, $body, $rpcurl, $username, $password, $arrCategories ); function dwos($title,$body,$rpcurl,$username,$password,$categories) { [INDENT]$categories = implode(",", $categories);[/INDENT] } [/CODE] or adding the values to the already imploded array within the function: [CODE] dwos($title,$body,$rpcurl,$username,$password,$categories) …

Member Avatar for blocblue
0
108
Member Avatar for theimben

A hint would be to use the [ICODE]scandir[/ICODE] and [ICODE]isdir[/ICODE] PHP method to write a recursive method... Post what you manage to write, and I'll happily help.

Member Avatar for kireol
0
261
Member Avatar for MCDT.CC

You should put your values in speech marks. And it is a good idea to use the PHP [ICODE]sprinf()[/ICODE] function for security too. [CODE] $strSql = sprinf( "update `PHPACUTIONXL_auctions` set `current_bid` = '%d', `start` = '%s', `ends` = '%s' where `id`= '%s'", '20', '2009-05-01 18:21:29', '2009-05-02 18:21:29', '1336eca400908b7a04133d27be69e27e' ); [/CODE] …

Member Avatar for blocblue
0
132
Member Avatar for brechtjah

Not entirely related to your question, but when writing my login script, I record the IP address from which a user accesses their account when they chose to be remembered (i.e. use a cookie). Then, you verify that not only does the encrypted key match what you have stored for …

Member Avatar for blocblue
0
124
Member Avatar for JimD C++ Newb

Where is the closing bracket for this last if statement? [QUOTE=JimD C++ Newb;848100] [code] if (mysql_num_rows($result) == 1) { $row = mysql_fetch_array($result, MYSQL_NUM); ?> <body> <form action="delete_user.php" method ="post"> <div id="main"> <p>Are you sure you want to delet this user?<br /> <input type = "radio" name = "sure" value = …

Member Avatar for vicky_rawat
0
181
Member Avatar for saquibaltaf

Hey, I usually use the float attribute. E.g. [CODE] <div id="wrapper"> [INDENT]<div id="header"></div> <div id="content"></div> <div id="footer"></div>[/INDENT] </div> [/CODE] The CSS for this would then be something like: [CODE] body { text-align: center; } #wrapper { width: 970px; margin: 0 auto; text-align: left; } #header { float: left; height: 50px; …

Member Avatar for blocblue
0
91
Member Avatar for cjwenigma

You're getting the value courseID from the URL. If this value isn't set, you'll get the notice you're seeing. To overcome this, you could use: [code=php]$courseID = ( isset( $_GET['courseID'] ) ? $_GET['courseID'] : 0 );[/code] This is basically an if - else statement in one line if you've not …

Member Avatar for blocblue
0
962
Member Avatar for uaecasher

I've worked as a PHP developer, and have since started a new job where most development is done on RoR. From what I have experienced, RoR is so much faster than PHP. However, I'm not sure it is a fair comparison, because RoR is a framework using the Ruby language, …

Member Avatar for blocblue
0
115
Member Avatar for BASSUHG

Hi Basshug, I'm not entirely sure what it is you're trying to achieve, however the php method strtotime is very useful and powerful. Using the strtotime method, you could pass it your dates, and it'll return a unix timestamp for each. Then you'll simply be doing a calculation using two …

Member Avatar for BASSUHG
0
191
Member Avatar for tedobg

Hi, I've never used phpBB, nor am I familiar with your article system. However, surely the topics in your forum are simply stored in a database table... So can you not simply modify the method in your article system which is responsible for creating new articles to insert a row …

Member Avatar for tedobg
0
141
Member Avatar for Godsp3ed

I encountered a similar problem when installing Ubuntu on MS VPC. I then found this [URL="http://arcanecode.wordpress.com/2008/11/10/installing-ubuntu-810-under-microsoft-virtual-pc-2007/"]article[/URL], which solved my issues. It may be worth you giving it a look too, if you definitely want to use 8.10. R.

Member Avatar for D3TONADOR
0
135
Member Avatar for veledrom

Personally, I check the username, password, then record the IP, session id and any cookie id issued in my DB. I then check the IP, session id and cookie id on every secured page access to ensure the session hasn't been hijacked, or fabricated (as I am on a shared …

Member Avatar for mschroeder
0
88
Member Avatar for xor83

Hey, If you could post the array structure, that'd help immensely... however at a guess, you could try the following: [CODE] foreach( $arrTable as $arrRow ) { [INDENT]foreach( $arrRow as $strCellValue ) { [INDENT]// do whatever you want with the cell value[/INDENT] }[/INDENT] } [/CODE] Does this help? R

Member Avatar for xor83
0
88
Member Avatar for dalefish

Simple solution, especially if you're using PHP would be to add a timestamp to the end of the filename. E.g. stylesheet.css?t=1234567890 This will result in the stylesheet link being different everytime, hence the browser cannot cache the file :) Hope this helps. R.

Member Avatar for MidiMagic
0
85

The End.