1,376 Posted Topics
Re: [QUOTE]All of the above[/QUOTE] I believe you's are all doing it wrong other than using the timezone function. There are two ways to achieve this result. One is the date_default_timezone_set() function and the other is the ini_set() function. So I would strongly suggest placing the following code at the top … | |
Re: Also make sure you have the latest version of apache as older versions of apache are not compatible with windozer 7 | |
Do you believe international animal rights laws should be introduced just like how there are human rights laws? IMO, clones are like animals since their not a creation of god or evolution and giving animals the same rights as humans would mean clones would also have the same rights as … | |
Happy independence day everybody! The day we won the battle against aliens invading area51. I'm celebrating it and yet I'm not even American. What did you do this independence day. | |
Re: Could you please add comments into your code so I can see how your code relates to your context. As it is your code looks totally different to what you are describing so please add comments into the code to make it more clear then I may be able to … | |
Re: You have a video game on your server!!! Then what do you do, use remote desktop to play the game. I don't mean to be offensive but that seems rather odd. If I were you I would uninstall counter strike. But if you wish for your server to load a … | |
Re: Line 26 should be as follows: [CODE]echo <<<END[/CODE] | |
Re: May I suggest to change the column type to bigint and instead of sending dates to mysql just sent the timestamp integer. Then you may use the php date function to retrieve it in any format. | |
Re: Or another option is to get javascript to store the information in a cookie. It is possible for javascript to make its own cookies containing up to 4KB of data. | |
Re: To my knowledge changing the page print settings for when a user prints a page is done by javascript and css as it is client side. There isn't much that php can do to change the page printout settings other then echoing the javascript/css code. | |
Re: I believe it is php your wanting to use if the file is stored on the server. There is a nice function called file_get_contents() and file_put_contents(). Below is an example of how to use them. [CODE]<?php $file='path/to/file.txt'; $data=file_get_contents($file); echo '<textarea name="text">'; echo $data; echo '</textarea>'; if (isset($_POST) && !empty($_POST)) { … | |
Re: Hi and welcome to daniweb. Could you please rephrase that in a way that directly addresses the problem your experiencing. It is hard to understand what the question is or what the problem is. | |
Re: Try the following: [CODE]<?php if (isset($_GET['y'])) { //do this } elseif (isset($_GET['x'])) { //do that }[/CODE] | |
Re: It is probably just an incompatibility bug because php 5.3.x is riddled with bugs. As for starters I would suggest downgrading your php version to 5.2.13 after that your bugs will most likely disappear is php 5.3.x has a few oop bugs which your error relates to. | |
Hi all, I have ubuntu and just installed sqlite then edit the php.ini file accordingly but for some reason the class named ¨SQLiteDatabase()¨ reports as undefined. The error is as follows: [CODE]Fatal error: Uncaught exception 'SQLiteException' with message 'SQLiteDatabase::__construct() [<a href='sqlitedatabase.--construct'>sqlitedatabase.--construct</a>]: unable to open database: /var/www/vhosts/cwarn23/base' in /var/www/vhosts/cwarn23/php.php:3 Stack trace: … | |
Re: Do you have a function named username() and a function named password()? Or is it you have variables named $username and $password? At the moment on line 68 and 69 &username = username() function and &password = password() function which I'm guessing do not exist. So try the following: [CODE] … | |
Re: Hi and I'm back. Now as for the solution sessions do use cookies for user identification. So if cookies are disabled then sessions are disabled. However there is a work around without changing the php.ini file at all and is as simple as changing the url of pages with sessions. … | |
Re: Could you please provide the related code and if your server has 32-bit Operating system or 64-bit. The example should be along the lines of the following. [CODE]<?php mysql_connect('localhost','root',''); mysql_select_db('my_database'); $r=mysql_query('SELECT * FROM `table`'); $data=mysql_fetch_assoc($r); echo $data['number'];[/CODE] | |
Re: I had this problem when making a search engine. The best solution is to make it run for a long period (say 8 minutes) and to schedule a cron job every 10 minutes. That way after 8 minutes your script will stop running then the server has 2 minutes of … | |
Re: Could you please put more information into your question as it is hard to understand. Please explain further. | |
Re: Try replacing line 31 with the following. [CODE]$done = $conn->prepare("INSERT INTO product_info (id, stock, brand, name, code, desc, story, cost, rrp, wt, size, top, fashion, active, lifestyle, sale) VALUES ('?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?')");[/CODE] That is assuming all of … | |
Re: It is fairly simple. The below two links will guide you through the process of using an external smtp server to send emails. [URL="http://blog.taragana.com/index.php/archive/how-to-send-mails-using-smtp-server-in-php/"]http://blog.taragana.com/index.php/archive/how-to-send-mails-using-smtp-server-in-php/[/URL] [URL="http://kb.siteground.com/article/How_to_use_Googles_free_SMTP_server.html"]http://kb.siteground.com/article/How_to_use_Googles_free_SMTP_server.html[/URL] | |
Re: [QUOTE]That's just a few thousand miles away![/QUOTE] And on the other side of the globe with probably a days worth of flights to get there. I hope it is a great success because if I were in Manhattan then I would certainly join. Btw this is my post 2,222 on … | |
Re: Here's a script from [URL="http://syntax.cwarn23.net/PHP/Pagination_made_easy"]this article[/URL]. [CODE=php]<?php $pages_left=3; $pages_middle=4; $pages_right=2; $total_pages=100; if (!isset($_GET['page']) && empty($_GET['page'])) { $currentpage=0; } else { $currentpage=$_GET['page']; } for ($p=0;$p<=$total_pages;$p++) { if ($p<$pages_left || $p>=($total_pages-$pages_right) || ($p>=($currentpage-floor($pages_middle/2)) && $p<=($currentpage+floor($pages_middle/2)))) { if ($p==$currentpage) { echo ($p>0)?' - ':''; echo '<b>'.($p+1).'</b>'; } else { echo ($p>0)?' - ':''; … | |
Re: [QUOTE=chrishea;1113826]I believe that they deserve to be rated highly.[/QUOTE] Not always. Just Host was rated as the Number 1 Australian webhost and I would rate them as somewhere near the bottom. Sometimes the ratings are done by the webhost meaning the ratings are not always accurate. | |
Re: Try checking the comparison table located at [URL="http://www.alledia.com/blog/general-cms-issues/joomla-and-drupal-which-one-is-right-for-you/"]http://www.alledia.com/blog/general-cms-issues/joomla-and-drupal-which-one-is-right-for-you/[/URL] | |
Re: The programs you require are notepad++ which is a great text editor with a syntax highlighter and for testing use wamp localhost server. Also for java apps netbeans is an easy to use app maker. As for which languages you require they are javascript, java, php, ajax, html and css. | |
Re: The only thing I could suggest is to put a big button saying "Click Here To Exit" the same size as the thread reply button. Surely even the blind would see that and hopefully would stop these odd complains about the signup window. | |
Hi, I just come back from a long time with a broken internet and now I see a new design on daniweb. Is it just me or do you for some parts of text need to squint and other parts move to the opposite end of the room to read? … | |
Re: When redirecting them in the first place add into the redirect url [ICODE]"login.php?url=".urlencode(/path/to/page/from.php);[/ICODE] Then on the form you place in the action= parameter the above path which is now in the $_GET tag. | |
Hi, I have a script which is meant to use all of my servers cpu but mysql will only use one core. I have 8 cores but only 1 core is being used. Does anybody know how to allow mysql to use multiple cores? -------- Second question How do I … | |
Hi, I just received my Ubuntu machine with 3.2GHz 7 core but now I need to install SQLite. Does anybody know where SQLite gets installed in Ubuntu or where itÅ› portable database files are stored as the php cms phpSQLiteAdmin requires me to copy a database file into the database … | |
Just out of curiosity where did the name Bing for Microsoft's search engine come from. Did they pronounce C sharp like an instrument crossed with programming. I'm not sure and thought I would start a topic to share thoughts on Bings name. | |
Re: I prefer to make my own so that way it is guaranteed to be secure and with all the features I need. And the process of making the template is fun too. But if I ever need to scratch out a quick cms then I would use mediawiki with custom … | |
Re: [CODE]RewriteEngine On RewriteRule ^/?articles/([0-9]+)/([a-zA-Z0-9\-]+)$ /article.php?id=$1 [L] RewriteRule ^/?articles/([0-9]+)/([0-9]+)/([a-zA-Z0-9\-]+)$ /article.php?id=$1&page=$2 [L] RewriteRule ^/?topics/([0-9]+)/([a-zA-Z0-9\-]+)$ /topic.php?id=$1 [L] RewriteRule ^/?topics/(.+)$ /sub-topic.php?topic=$1 [L] RewriteRule ^/?authors/([0-9]+)/([a-zA-Z0-9\-]+)$ /author.php?id=$1 [L] RewriteRule ^/?authors/([0-9]+)/([0-9]+)/([a-zA-Z0-9\-]+)$ /author.php?id=$1&page=$2 [L] RewriteRule ^/?preview/([0-9]+)/([a-zA-Z0-9\-]+)$ /preview.php?id=$1 [L] RewriteRule ^/?preview/([0-9]+)/([0-9]+)/([a-zA-Z0-9\-]+)$ /preview.php?id=$1&page=$2 [L] ErrorDocument 400 /error?id=badrequest ErrorDocument 401 /error?id=authreq ErrorDocument 403 /error?id=forbidden ErrorDocument 404 /error?id=notfound ErrorDocument 500 /error?id=server[/CODE] | |
Re: Try replacing the meta on line 10 with the following: [CODE]header('Location: '.$HTTP_SERVER_VARS['PHP_SELF'].'?id='$orderID); exit();[/CODE] | |
| |
Re: Try this: [CODE]<html> <head><title>My Portfolio</head> <body bgcolor='#f1f1f1' text='#000000' link='#33cc00' alink='#33cc00' vlink='#33cc00'> <table align='center' width='95%' bgcolor='#FFFFFF' style='border-color:#999999;border-style:solid;border-width:1px' border=0> <tr> <td align='center'> <table width='100%'> <img src='images/logo.png'> </td> </tr> </table> </table> <br> <table align='center' width='95%' bgcolor='#FFFFFF' style='border-color:#999999;border-style:solid;border-width:1px' border=0> <tr> <td align='center'> <table width='100%'> <font size='2' face='arial'><a href ="home.php">Home</a> | <a href ="2.php">Blog</a> | … ![]() | |
Re: try this: [CODE]<table> <?php while($assoc_latestJobPost = mysql_fetch_assoc($latestJobPost)) { ?> <tr> <td><?php echo $assoc_latestJobPost['jobTitle']; ?></td> <td><?php echo $assoc_latestJobPost['jobCategoryID']; ?></td> <td><?php echo $assoc_latestJobPost['postDate']; ?></td> <td><?php echo $assoc_latestJobPost['employerID']; ?></td> </tr> <?php } ?> </table>[/CODE] where $latestJobPost being assigned by the mysql_query() function. ![]() | |
Re: [CODE]if (file_exists($path)) { //or loop through files foreach (glob("*.txt") as $filename) { echo "$filename size " . filesize($filename) . "\n"; } [/CODE] ![]() | |
Re: PHP is a server side Pink Hypertext Preprocessor. Basically php processes content stored on the server before it is presented to the user. To get php you can google xampp or wamp and will allow you to view php files on your computer. As for dreamweaver, don't use it. ![]() | |
Hi, I am glad to announce the release of the PHP robot which stores information from daniweb topics to answer questions. You may view my bot at [URL="http://chat.cwarn23.info/"]http://chat.cwarn23.info/[/URL] and it can answer all sorts of questions. In addition you can chat to other people who are online at the time. … ![]() | |
Re: I agree with Gresham but beg to defer on the code an not concept. Example: [CODE]function truehash($input) { return hash('sha1',substr(hash('sha1',$input),4,-4).hash('crc32',$input)); }[/CODE] | |
Re: Could you provide a better description of your code (perhaps php comments) and describe in more detail why you can't do it. The theory behind it is you search through to inbox in a loop then as you retrieve them the messages go through an if statement and if that … | |
Re: Well you should be able to delete entire sections of your php.ini file and delete the extensions you don't want from the php.ini and from the file system but remember to keep the dependencies. That is some dll's rely on others. The dependencies documentation can be found at php.net. Also … | |
Re: I see a bug in your code and try each of the following: [CODE]if(isset($_POST['checkbox1'])) { echo '<p>Send me medical updates about mammography.</p>'; echo '<input type="checkbox" name="checkbox1" checked="checked" value="YES">'; } if(isset($_POST['checkbox2'])) { echo '<p>Keep me connected with the latest blog posts.</p>'; echo '<input type="checkbox" name="checkbox1" checked="checked" value="YES">'; } if(isset($_POST['checkbox3'])) { echo … | |
Re: Hi and welcome to daniweb. Could you please edit your post and add code tags. Also as for the solution change the second last line to the following: [CODE]$sql_email_check = mysql_query("SELECT email FROM mymembers WHERE email='$emailCHecker'") or die(mysql_error());[/CODE] Then tell me what error that reports. | |
Re: Could you please make this question clear. Are you trying to place an exel file into a database or are you trying to extract the data from excel and place that data into mysql with php? | |
Re: Try this: [CODE] // code to generate drop down box $query="SELECT title FROM content ORDER BY title ASC"; $result = mysql_query ($query); echo "<select name=title value=''>Title</option>"; while($nt=mysql_fetch_array($result)){ echo "<option value=\"$nt[title]\">$nt[title]</option>"; } echo "</select>"; //on the next page where its deleted the code is... // we have something to delete $SQLcmd … | |
Re: When using sessions you need to always place the session_start(); function on the first line of your script before any html or new line output. So delete that new line at the beginning of your file and place at the top the following: [CODE]<?php session_start();[/CODE] That will enable sessions to … |
The End.