Search Results

Showing results 1 to 40 of 61
Search took 0.03 seconds.
Search: Posts Made By: cwarn23 ; Forum: PHP and child forums
Forum: PHP 7 Days Ago
Replies: 5
Views: 322
Posted By cwarn23
Exactly and in addition to that your host may have turned off short tags in the php.ini file so you might need to use the full <?php.
Forum: PHP 8 Days Ago
Replies: 3
Views: 257
Posted By cwarn23
Here's a script from this article (http://syntax.cwarn23.net/PHP/Pagination_made_easy).
<?php
$pages_left=3;
$pages_middle=4;
$pages_right=2;

$total_pages=100;
if (!isset($_GET['page']) &&...
Forum: PHP 10 Days Ago
Replies: 3
Views: 282
Posted By cwarn23
You can take a look at this thread (http://www.daniweb.com/forums/thread239874.html) for a script that already has some of those abilities programmed in. But there would be a lot more programming to...
Forum: PHP 11 Days Ago
Replies: 7
Views: 320
Posted By cwarn23
I have a template that I can give you and it is as follows:
<form method="post">Scan site: <input type="text" name="site" value="http://" style="width:300px">
<input value="Scan"...
Forum: PHP 13 Days Ago
Replies: 12
Solved: Echo array
Views: 382
Posted By cwarn23
Maybe my explanation was too short. Sometimes people will do the following:
<?php
$connection = mysql_connect("myserver.com","myuser","mypassword") or die ("Couldn't connect to server.");
$db =...
Forum: PHP 13 Days Ago
Replies: 19
Solved: auto refresh
Views: 466
Posted By cwarn23
That is correct from what I have read in the past.
Forum: PHP 14 Days Ago
Replies: 4
Views: 258
Posted By cwarn23
Perhaps this:
<?php
mysql_connect(HOST,USER,PASS);
@mysql_select_db("db303278079") or die( "Unable to select database");
$query="SELECT * FROM restaurants";
$result=mysql_query($query);...
Forum: PHP 14 Days Ago
Replies: 3
Views: 348
Posted By cwarn23
Try adding the following to the top of your php file(s)
setcookie ('PHPSESSID', $_COOKIE['PHPSESSID'], time()+172800);
Forum: PHP 18 Days Ago
Replies: 109
Views: 3,504
Posted By cwarn23
Well when I say the word "you" I refer to the reader. Sorry if it was a bit confusing as many things in this topic are confusing to the untrained eye.
Forum: PHP Oct 14th, 2009
Replies: 107
Views: 3,359
Posted By cwarn23
Well for those with a slow internet connection every 10 seconds the video will pause and buffer then continue. I hate how that happens but I guess there is no way around it.
Forum: PHP Oct 14th, 2009
Replies: 107
Views: 3,359
Posted By cwarn23
Cool, discovered that the player has some impressive documentation at http://developer.longtailvideo.com/trac/wiki/FlashVars

Now that I have my player working, could anyone reading this review the...
Forum: PHP Oct 7th, 2009
Replies: 107
Views: 3,359
Posted By cwarn23
:)[/QUOTE]
:twisted: Indeed
Forum: PHP Oct 6th, 2009
Replies: 107
Views: 3,359
Posted By cwarn23
Now that's an idea. I was planning to add them to my website and submit the best ones to daniweb but I now that you mention it I will make youtube videos too.
Forum: PHP Oct 6th, 2009
Replies: 107
Views: 3,359
Posted By cwarn23
Wow, those are excellent suggestions. I will start them as soon as possible and I think the charts tutorial will be interesting as I have made php charts once before but haven't really used them....
Forum: PHP Oct 5th, 2009
Replies: 3
Views: 636
Posted By cwarn23
Also don't forget to try the imap_mail() (http://au2.php.net/manual/en/function.imap-mail.php) function.
Forum: PHP Oct 5th, 2009
Replies: 7
Views: 258
Posted By cwarn23
Well try adding the following line just before the mail function to see if the address to is being stored properly.
echo '<h1>'.$to.'</h1>';
It should display the email address and if it doesn't...
Forum: PHP Oct 3rd, 2009
Replies: 107
Views: 3,359
Posted By cwarn23
Hi and I am planning to make a bunch of tutorials. I would like to hear what sort of php/ajax tutorials people would like to see. I have heard in the past that some noobs would like a tutorial on...
Forum: PHP Sep 10th, 2009
Replies: 3
Code Snippet: Filter url to domain
Views: 1,249
Posted By cwarn23
In these three functions, you can filter to a url to just the domain name. There are three main methods of doing so which are all shown in the example and the usage of each function is shown in the...
Forum: PHP Sep 9th, 2009
Replies: 13
Views: 1,587
Posted By cwarn23
Does anybody know how I would use sockets to tap into the SMS protocol for sending+receiving SMS messages. Basically, all I want to be able to do is setup a php script that will be able to act as the...
Forum: PHP Sep 9th, 2009
Replies: 4
Views: 263
Posted By cwarn23
Actually it should be as follows:
<option value="0" <?php echo ($installtype == "0" || $installtype == 0) ? "selected" : ""; ?> >Install with CPanel Info (can create MySQL DB ...
Forum: PHP Sep 5th, 2009
Replies: 21
Views: 736
Posted By cwarn23
Try the following code:
<?
mysql_connect('localhost','root','');
mysql_select_db('mydatabase');
if (isset($_POST) && !empty($_POST)) {
function generate($sql) {
$dat='';
...
Forum: PHP Sep 4th, 2009
Replies: 7
Views: 429
Posted By cwarn23
In case you want to make a custom function, the following code will do the job but is really slow. But this will give you something to play with.<?
function get_date($date,$timestamp=false) {
...
Forum: PHP Aug 27th, 2009
Replies: 17
Views: 688
Posted By cwarn23
I have checked your code and although it's a bit messy and buggy, a corrected version (still messy) is as follows:
$list = file_get_contents($imgpath);
$listarray = array();
$listarray =...
Forum: PHP Aug 14th, 2009
Replies: 1
Views: 280
Posted By cwarn23
Why not just try it and find out. That's one of the great things with having xampp or wamp/lamp. Because you can easily test it under a localhost environment with that software and I can tell you...
Forum: PHP Jul 23rd, 2009
Replies: 4
Views: 503
Posted By cwarn23
Try something like this
mysql_query('INSERT INTO lesson (subject, year, learningArea, objectives, ability) VALUES ("'.mysql_real_escape_string($onrow["subject"]).'",...
Forum: PHP Jul 1st, 2009
Replies: 21
Views: 1,494
Posted By cwarn23
I was thinking of a new project for making a bot that scans daniweb for information and enters useful information into a database then people can ask the website questions and php+mysql will provide...
Forum: PHP Jun 28th, 2009
Replies: 6
Views: 486
Posted By cwarn23
Well if that website that php re-enters the password in uses $_GET tags and not $_POST tags then you can simply use the file_get_contents() function to retieve the information. If however the...
Forum: PHP Jun 26th, 2009
Replies: 27
Views: 1,349
Posted By cwarn23
Could you please post the lines around $Valuechild=array(); and check that it also uses the right casing because I can only see half the picture here.
Forum: PHP Jun 1st, 2009
Replies: 6
Views: 493
Posted By cwarn23
Below is a direct quote from the select syntax of the official mysql manual:
LIMIT {[offset,] row_count | row_count OFFSET offset}
As you can see, it makes an if statement. It can be broken down to...
Forum: PHP May 31st, 2009
Replies: 11
Views: 708
Posted By cwarn23
I would suggest using sessions to check what stage the user is at then make php exit the script with a message if the user has viewed a page in the wrong order. Below is an example:
<?...
Forum: PHP May 31st, 2009
Replies: 6
Views: 493
Posted By cwarn23
There are a few bugs and security holes in that script. So try the following:

mysql_connect(" ") ; //add variables in function
mysql_select_db(" "); //add variables in function
...
Forum: PHP Apr 29th, 2009
Replies: 5
Views: 690
Posted By cwarn23
Well actually I would use htmlentities() to prevent any html from going into the database and at the same time use mysql_real_escape_string(). To help explain below is an example code for a youtube...
Forum: PHP Apr 4th, 2009
Replies: 41
Views: 4,199
Posted By cwarn23
And also to test your theory below is some code the will prove that javascript cannot communicate with php:
<?
function myfunction($var){
return $var;
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD...
Forum: PHP Apr 4th, 2009
Replies: 15
Views: 608
Posted By cwarn23
Well as I mentioned earlier, the following function should be able to validate anything that goes into the url bar.
function validation($input) {
$input = mysql_real_escape_string($input);
$input...
Forum: PHP Apr 4th, 2009
Replies: 6
Views: 811
Posted By cwarn23
Is this what your looking for? It uses google to search a selected site for selected keywords.
<?php

function search($search_term,$site)
{
global $dsite;
$bits = explode('/', $site);
if...
Forum: PHP Apr 4th, 2009
Replies: 5
Views: 392
Posted By cwarn23
I have just completed the first version of the script. The main script is as follows:
<?
set_time_limit(0);
ini_set('magic_quotes_gpc','Off');
include('db.php');...
Forum: PHP Apr 3rd, 2009
Replies: 13
Views: 864
Posted By cwarn23
Well to help answer the questions of why the action= will go to test.php?action=test only when method=post is that when method=get, the parameters in the form overwrite the parameters specified in...
Forum: PHP Apr 2nd, 2009
Replies: 21
Views: 1,008
Posted By cwarn23
Try this:
$realUser_q = mysql_query("SELECT Username FROM my_db WHERE Username = $user ") or die(mysql_error());
$realUser=mysql_fetch_array($realUser_q);
//above sets the $realUser[] Array...
Forum: PHP Mar 26th, 2009
Replies: 2
Views: 622
Posted By cwarn23
You have a broken loop statement!!
Try the following:
$table_field = 'name';
$result = "select * from table";
while($myrow = mysql_fetch_array($result)) {
$text .= $myrow[$table_field] . ", ";...
Forum: PHP Mar 22nd, 2009
Replies: 3
Views: 490
Posted By cwarn23
Although I couldn't understand all of that question(s) to empty all sessions just use the following:
$_SESSION=array();
Showing results 1 to 40 of 61

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC