wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
[SOLVED] display correctly css files in apache2
wildteen88 replied to htamayo's topic in Apache HTTP Server
How are you attaching your stylesheet? -
To create your links A through Z use foreach(range('a', 'z') as $letter) { echo '<a href="?cat=' . strtolower($letter) . '">' . $letter . '</a>'; } Then to show all categories that start with the selected letter, do $cat = isset($_GET['cat']) ? $_GET['cat'] : null; if(in_array($cat, range('a', 'z'))) { $result = mysql_query("SELECT * FROM xzclf_cats WHERE catname LIKE '$cat%' ORDER BY catname ASC"); while($row = mysql_fetch_assoc($result)) { echo $row['catname']; echo "<br />"; } }
-
You have to check $_GET['limit'] is greater than 0 too as CV suggested earlier. Otherwise the else statement will never execute.
-
[SOLVED] display correctly css files in apache2
wildteen88 replied to htamayo's topic in Apache HTTP Server
css files aren't handled by Apache. Apache will only serve the css file to the web browser, which will apply the CSS defined to your page. -
Best place is php.net and have read of the first few chapters of the documentation. Then head over to hudzilla.org which is a free php ebook.
-
Where is the array defined? Post your code.
-
Make sure you have a url variable set called client, that is what the variable $_GET['client'] refers to. Example yoursite.com/page.php?client=1234
-
Explain what your code is supposed to do, The following makes no sense: else { $num = $_POST['num']; $check_item[] =$_POST['checkItem']; $check_item[] = $_POST['element']; $check_item[] = $_POST['label']; $_SESSION["$num"] = $check_item; $_SESSION['count'] = ++$num ; if($num == $_SESSION['num_Items']) { //$_SESSION['checks'] = $check_item ; header("location:checking1.php"); } else { header("location:come.php"); } }
-
It is after the rewrite. Can you show me your rewrite rules.
-
Have a read of the follow article, explains mysql transactions.
-
[SOLVED] is there anything like implode, but vertically?
wildteen88 replied to jaydeesmalls's topic in PHP Coding Help
BY default header tags (<h1> to <h6>) have a default padding/margin. Because of this your numbers will be spaced apart. To remove padding/margin apply the following CSS h5 { padding: 0; margin: 0; } Or don't use a header tag to display your numbers. -
We'll need to see more code than that.
-
[SOLVED] I'm getting a memory leak, or something
wildteen88 replied to jordanwb's topic in PHP Coding Help
chdir just adds more complexity to your script (I have never used it). My suggestion is a lot easier to maintain. -
You can use the ODERY BY column_name ASC clause in your query to sort your results by a column.
-
[SOLVED] cannot redeclare function xy
wildteen88 replied to freejellyfish's topic in PHP Coding Help
I have found the problem, you have defined the startElement function within the rss_parser function. Everytime you call the rss_parser function you are redefining the startElement function. Move the statElement function outside of the rss_parser function. -
Where is the output coming from? How is the output stored within an array? if its an array PHP has many functions for sorting array items, such as sort(), asort(), rsort() etc.
-
[SOLVED] cannot redeclare function xy
wildteen88 replied to freejellyfish's topic in PHP Coding Help
Hold on read the error message carefully. That error message is coming form rssparser.php on line 11 not from the file you include rssparser.php -
Umm, Re-read CV's post again. Its all explained in there. Ignore the timepassed just use time() function
-
[SOLVED] I'm getting a memory leak, or something
wildteen88 replied to jordanwb's topic in PHP Coding Help
Na, do not use chdir. I recommend you setup a few constants in session.php, call these BASE and ADMIN_BASE like so: define('SYS', dirname(__FILE__)); define('ADMIN_SYS', dirname(SYS) . '/admin/system'); When ever you include a file from system directory, do include SYS . '/file.php'; To include a file from admin system directory, do include ADMIN_SYS . '/file.php'; You'll have to use a relative path though to include system/session.php as that is where the constants are defined. -
Does E0010, E0020, E0030 have some special meaning in your script? I cannot see how simply checking checkbox and submitting the form can create a database table with so little data to go by.
-
By table do you mean HTML table or database table?
-
PHP Infinite Tabs [Running XAMPP]
wildteen88 replied to dwkelley86's topic in PHP Installation and Configuration
It's most probably what you're trying to do that is causing it. How are you running the files? You should go to http://localhost/yourfile.php to run your PHP scripts. If your script is causing tabs to be opened then its something to do with your code. -
could you post more details along with some example data. Not understanding you fully,
-
[SOLVED] I'm getting a memory leak, or something
wildteen88 replied to jordanwb's topic in PHP Coding Help
I have downloaded and ran your code, index.php worked fine as you said, however for admin/index.php it did take a while to load and then nothing happened after a couple of secounds. After doing a lot of commenting/uncommenting of lines I narrowed it down to the following line in system/sessions.php include ("settings.php"); For some reason PHP would crash, I got no error messages, just plank page. I found this strange as I have error_reporting set to E_ALL and display_errors enabled. Once I commented that line out everything worked fine, and I got a screen full of errors. Next I decided to copy the code in setting.php to system/session.php and everything worked nicely. So my conclusion is to do with how PHP is trying to include files. Maybe you should rethink your file structure. -
Enable Image Function in PHP
wildteen88 replied to lakshitha's topic in PHP Installation and Configuration
If you have PHP5.2.4 installed, then you need to that release from the PHP archives, download the windows binary version here. Open the zip and extract php_gd2.dll from the ext folder and place it in your PHP ext folder EDIT: You'll also need gds32.dll this file comes in the download too, move it where php.exe is