Forum: PHP 22 Days Ago |
| Replies: 2 Views: 252 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 Views: 1,401 @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 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 Edited, removed!
EDIT: Glad you solved it! |
Forum: PHP Oct 24th, 2009 |
| Replies: 4 Views: 638 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 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 I use this in my projects:
http://www.evolt.org/node/60384 |
Forum: PHP Oct 21st, 2009 |
| Replies: 20 Views: 641 It's better if you use ready classes... try: phpclasses.org |
Forum: PHP Oct 20th, 2009 |
| Replies: 20 Views: 641 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 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 Look at the post above yours mate! i posted the code, didn't it work???? |
Forum: PHP Sep 19th, 2009 |
| Replies: 12 Views: 657 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 |
Forum: PHP Sep 16th, 2009 |
| Replies: 7 Views: 285 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 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 <?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 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 I use the class on the attachment to backup my CMS! |
Forum: PHP Sep 15th, 2009 |
| Replies: 2 Views: 590 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 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 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 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 Are you using wamp? If yes, i get the same error too :D |
Forum: PHP Sep 15th, 2009 |
| Replies: 4 Views: 275 $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 |
Forum: PHP Sep 14th, 2009 |
| Replies: 9 Views: 355 Can i have a DB with some data, would like to test on localhost! |
Forum: PHP Sep 14th, 2009 |
| Replies: 3 Views: 250 This:
urlencode (['$logic'])
Should be:
urlencode ($logic)...
Whole code:
<?php
if (empty($_GET['q'])){ |
Forum: PHP Sep 14th, 2009 |
| Replies: 4 Views: 241 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 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 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 Views: 969 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 <?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 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 \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 Do you wan't to mass mail, or just a single email? |
Forum: PHP Sep 14th, 2009 |
| Replies: 3 Views: 231 $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 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 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 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 Can someone help me on making a function that can check for new version of my script!
Any Sample Code? |