Search Results

Showing results 1 to 40 of 57
Search took 0.01 seconds.
Search: Posts Made By: smartness ; Forum: PHP and child forums
Forum: PHP 22 Days Ago
Replies: 2
Views: 252
Posted By smartness
Hi DaniWeb users.

I am creating a mp3 shop cart script, and I need a function to create a unique id of multiple items in the cart.

for example in cart are these id's: 1,6,21,5
base64 would...
Forum: PHP 22 Days Ago
Replies: 4
Code Snippet: Private Messaging system
Views: 1,401
Posted By smartness
@xueping:

You have to set a mysql connection to you DB... example:
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');

then select your DB:
mysql_select_db($db_database,$link);
Forum: PHP 22 Days Ago
Replies: 3
Views: 363
Posted By smartness
Here look this post! I think this is what you wan't!

It's the function I use to paginate almost everything that is "paginable" :P ;)

http://www.daniweb.com/forums/post990635.html#post990635
...
Forum: PHP Oct 24th, 2009
Replies: 4
Views: 638
Posted By smartness
Edited, removed!

EDIT: Glad you solved it!
Forum: PHP Oct 24th, 2009
Replies: 4
Views: 638
Posted By smartness
What is the Code in functions.php on line 52? (the whole function if possible)



I think this is caused because you didn't create a instance of the class

$class = new YourClassName();

Or...
Forum: PHP Oct 21st, 2009
Replies: 20
Views: 641
Posted By smartness
I don't know about his Skills, but a starter can't Code everything from scratch! Classes are coded by more experienced coders, and they are provided with examples...

If he (phpangel) wants to...
Forum: PHP Oct 21st, 2009
Replies: 8
Views: 306
Posted By smartness
I use this in my projects:
http://www.evolt.org/node/60384
Forum: PHP Oct 21st, 2009
Replies: 20
Views: 641
Posted By smartness
It's better if you use ready classes... try: phpclasses.org
Forum: PHP Oct 20th, 2009
Replies: 20
Views: 641
Posted By smartness
Well I'm a starter too, but I did my own cms, and has a lot of features!

Depending on what site it is, i can help you:
I can help you with the User Authentication/Login System, Admin Panel with...
Forum: PHP Oct 17th, 2009
Replies: 3
Views: 371
Posted By smartness
Add/Replace the files inside your /htdocs/ folder, i think that's the default home directory for Apache
Forum: PHP Sep 19th, 2009
Replies: 12
Views: 657
Posted By smartness
Look at the post above yours mate! i posted the code, didn't it work????
Forum: PHP Sep 19th, 2009
Replies: 12
Views: 657
Posted By smartness
Currently, when you're on Page 9, the link is displayed like this:

«« First « Prev 6 7 8 9 10 11 12 13 14 Next » Last »»

This is better, cuz the visitor will have the last 3 previous page, and...
Forum: PHP Sep 16th, 2009
Replies: 7
Views: 285
Posted By smartness
also, don't forget hn=
Forum: PHP Sep 16th, 2009
Replies: 7
Views: 285
Posted By smartness
This works for me, this sent me to:
http://localhost/bookview.php?id=4&hn=victory


<?php
$row['bookingref'] = "4";
$row['hotelname'] = "victory";
echo '<button type="button"...
Forum: PHP Sep 15th, 2009
Replies: 3
Views: 309
Posted By smartness
Yep, I'd suggest Wamp to, 1 click installing:

http://www.wampserver.com/en/index.php
Forum: PHP Sep 15th, 2009
Replies: 3
Views: 421
Posted By smartness
<?php
global $db;
$array = $db->fetch_array_from_query("Stuff here");

echo "<pre>";
print_r($array);
echo "</pre>";
?>

Try this and you will get a "clear view" of the...
Forum: PHP Sep 15th, 2009
Replies: 11
Views: 451
Posted By smartness
I would suggest this, i use it everywhere (in my projects):

http://www.ricocheting.com/scripts/php_mysql_wrapper.php
Forum: PHP Sep 15th, 2009
Replies: 16
Views: 762
Posted By smartness
I use the class on the attachment to backup my CMS!
Forum: PHP Sep 15th, 2009
Replies: 2
Views: 590
Posted By smartness
Where do you get the e-mails from? Mysql?

If yes, then i would suggest:
add a "lastsent" field, and each time you send a e-mail, update that field with a time().

So before you sent emails...
Forum: PHP Sep 15th, 2009
Replies: 7
Views: 287
Posted By smartness
Yep, I can help...

I need to know the db fields & where/what you want to use! How you wan't it displayed etc...

are you trying to output rss feeds or what?
Forum: PHP Sep 15th, 2009
Replies: 12
Views: 657
Posted By smartness
I use this function to paginate:


<?php
if(isset($_GET["page"])) {
$page = $_GET["page"];
} else {
$page = 1;
}
$totalPages = 1000;
Forum: PHP Sep 15th, 2009
Replies: 1
Views: 549
Posted By smartness
I don't know if i understand you, but can you try this:

<table id="sampletable">
<tr>
<?php foreach ($Report_attrid as $report1): ?>
<td id="headerid<?php echo...
Forum: PHP Sep 15th, 2009
Replies: 20
Views: 483
Posted By smartness
Are you using wamp? If yes, i get the same error too :D
Forum: PHP Sep 15th, 2009
Replies: 4
Views: 275
Posted By smartness
$productId = (int)$_GET['productId'];

and you have the SQL Condition:


so lets say $_GET['productId'] = 2;
it means $productId = 2;

the query:
$sql = "UPDATE tbl_product SET cat_id =...
Forum: PHP Sep 14th, 2009
Replies: 4
Views: 241
Posted By smartness
Forum: PHP Sep 14th, 2009
Replies: 9
Views: 355
Posted By smartness
Can i have a DB with some data, would like to test on localhost!
Forum: PHP Sep 14th, 2009
Replies: 3
Views: 250
Posted By smartness
This:
urlencode (['$logic'])

Should be:
urlencode ($logic)...


Whole code:
<?php
if (empty($_GET['q'])){
Forum: PHP Sep 14th, 2009
Replies: 4
Views: 241
Posted By smartness
add this after $newUrl:

echo '<a href="'.$newUrl.'">Link Text Here</a>';

or this:

echo "<a href=\"$newUrl\">Link Text Here</a>";

its the same
Forum: PHP Sep 14th, 2009
Replies: 3
Views: 184
Posted By smartness
Your welcome... I'm a beginner tooo. p.s. click solved or change the title to [Solved] + Title...
Forum: PHP Sep 14th, 2009
Replies: 9
Views: 355
Posted By smartness
Use:

$query = mysql_query("SELECT COUNT(*) FROM `search`", $connection);

instead of:

$query = mysql_query("SELECT * FROM `search`", $connection);
mysql
$count = mysql_num_rows($query);
Forum: PHP Sep 14th, 2009
Replies: 24
Solved: Default Image?
Views: 969
Posted By smartness
i think this has something with .htaccess to do...

You must rewrite:

RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^picture/([a-zA-Z0-9.,!_-]+)$ avatar.php?id=$1...
Forum: PHP Sep 14th, 2009
Replies: 3
Views: 184
Posted By smartness
<?php
$ser = $_GET['q'];
$logic = "~resume (filetype:pdf OR filetype:doc OR filetype:rtf OR filetype:htm OR filetype:html) skill -jobs -apply -submit -required -wanted -write -sample";
$logic =...
Forum: PHP Sep 14th, 2009
Replies: 21
Views: 596
Posted By smartness
try this:

<?php
//The button is presed
if (isset($_POST["submit"]))
{
$name = $_POST['name'];
$email = $_POST['email'];
$question = $_POST['question'];
$message = "Message from...
Forum: PHP Sep 14th, 2009
Replies: 3
Views: 252
Posted By smartness
\n will not give you a line break if you use single quotes...

Do not use $string = 'Something \n';
instead use$string = "Something \n"; Now \n will be a line break (in html of course... Use...
Forum: PHP Sep 14th, 2009
Replies: 4
Views: 335
Posted By smartness
Do you wan't to mass mail, or just a single email?
Forum: PHP Sep 14th, 2009
Replies: 3
Views: 231
Posted By smartness
$array = $_POST;
foreach($array as $values => $value) {
//echo $value.'<br />';
$value = trim($value);
//Everything except the "sumbit" button
if($value != "Submit") {
$result =...
Forum: PHP Sep 14th, 2009
Replies: 4
Views: 427
Posted By smartness
this? if yes, write these in the somewhere in the top of your file, so you can use them everywhere!

<?php
//First
$something = $_GET["something"];
echo $something;

//You may use this:...
Forum: PHP Sep 14th, 2009
Replies: 1
Views: 242
Posted By smartness
I need a mysql user authentication class with only 3 user "levels"

1. Admin
2. Registered (or normal) user
3. Guest

I tried phpclasses.org but couldn't find a good one (maybe i didn't try...
Forum: PHP Aug 10th, 2009
Replies: 8
Views: 2,543
Posted By smartness
Thanks Raphie, but this thread is to old, and i have more knowledge in php now, but in fact I didn't continue that script cuz i got stuck!

So thank you very much for your time...

(as for me)...
Forum: PHP Jan 22nd, 2009
Replies: 1
Views: 371
Posted By smartness
Can someone help me on making a function that can check for new version of my script!

Any Sample Code?
Showing results 1 to 40 of 57

 


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

©2003 - 2009 DaniWeb® LLC