-
Posts
840 -
Joined
-
Last visited
-
Days Won
1
Everything posted by gristoi
-
try: <ul> <?php $result = mysql_query("SELECT * FROM pages INNER JOIN parent_pages ON pages.parentID=parent_pages.ID WHERE pages.parentID=parent_pages.ID"); while ($row = mysql_fetch_assoc($result)):?> <li class="mainnav"><a rel='nofollow' href='view.php?id=<?php print $row['ID'];?>'><?php print $row['Name'];?></a> <ul> <li class="subnav"><a rel='nofollow' class="sublink_nav" href='viewpage.php?pageid=<?php echo $row['pageID'];?>'><?php print $row['pageName'];?></a></li> </ul> </li> <?php endwhile;?> <?php $result2 = mysql_query("SELECT * FROM parent_pages WHERE pageID='0'"); while ($row2 = mysql_fetch_assoc($result2)):?> <li class="mainnav"><a rel='nofollow' href='view.php?id=<?php print $row2['ID'];?>'><?php print $row2['Name'];?></a></li> <?php endwhile;?> </ul>
-
is your new database table definitely called webestat_site and not webstats_site. And the table called stats?
-
Have you even attempted this on your own? you will be hard pushed to find someone who will write an entire script for you from scratch. If you have attempted this then please post some of your code
-
Google is your friend: http://dev.mysql.com/doc/refman/5.0/en/join.html
-
there is a bult in function in mysql that allows you to pass in an array as a parameter: $array = (1,2,3,4); SELECT *, CONCAT(locations.zip_code, ' ', locations.city) as location from locations, locations_associations where locations.zip_code = locations_associations.zip_code AND client_id IN ($array);
-
<table style="width:700px;display:none;">
-
you could use the google webmaster tools. this will show you all traffic data etc for your site. Also it allows you to upload you sitemap, which could increase your ranking and searchability. https://www.google.com/accounts/ServiceLogin?service=sitemaps&passive=true&nui=1&continue=https://www.google.com/webmasters/tools/&followup=https://www.google.com/webmasters/tools/&hl=en
-
firstly, try not to use sum as a field name. this is a reserved word in mysql. You can try something like this: INSERT INTO table (Date, Value, TotalSum) VALUES ('$date', '$value', (SELECT SUM(value) FROM table WHERE Date < '$date')) Note that i am presuming your ID is auto incimenting so i havent included it
-
err? your missing part and email from your post declarations
-
Why should you learn javascript when you know php?
gristoi replied to Bentley4's topic in Miscellaneous
Drag and drop, sortable lists on the fly without page reloading......................... the list goes on -
firstly,try to learn the an Object Oriented approach to your coding. Other languages to think of are Ext JS, Extjs Touch( mobile), also read up on Design Patterns
-
It is escaping the string for you. because you are using double quotes within double qoutes then without them your echo would output: <a href= onely, and the rest would be ignored / thrown error
-
foreach($_SESSION as $product => $quantity) { INSERT INTO table1 (product_id, quantity) VALUES ('$product', '$quantity') ....... } looks like the session is holding a key-pair array of data, so a simple foreach loop will extract what you need
-
use some javascript on the client side and then some further validation on the server side: pop an id into each of the field tags and try something like var hpl = document.getElementById('hpl')
-
what is the data type for your dob field? If you used a date type then you can just do it all in one query SELECT * FROM detail WHERE dob = CURDATE() and if you use a datetime datatype: SELECT * FROM detail WHERE DATE(dob) = CURDATE() and if you wanted to get everyone who had a birthday tomorrow: SELECT * FROM detail WHERE DATE(dob) = DATE_ADD(CURDATE(), INTERVAL 1 DAY); etc.....................
-
The exception is telling you that you have a syntax error in your query. This could be due to an escape character being passed into the user variable. Try doing: $query = "SELECT * FROM `users` WHERE `username` = '".$user."' AND `password` = '".$pw."'"; Also try and echo out $query to see what the query looks like
-
If you have access to setup up cron jobs then set a cron to run mysqldump -u<your username> -p< your password> <database name> | <compression type e.g gzip> > location
-
youve got the div's style set to hidden. So it wont diplay enything until you add the display block to it
-
Remove any whitespace
-
Mjdamato is right, the php.net manually is a life saver. A great reference
-
Please help, submitting to DB when form not complete.
gristoi replied to VinceGledhill's topic in PHP Coding Help
You have your database insert sitting outside of your error logic. So no matter what you are executing the query. Move the query into the else statement -
Try ($num = 10; $num >= 1; $num--)
-
Auto clear php form n conenction bet php n flex project
gristoi replied to nandakishore_nani's topic in Applications
Try sending a static email to test if the actual email functionality is working mail('youremailaddress@somewhere','test subject','test message'); If that dosent send then you need to ensure your web hosting has email functionality enabled. Otherwise you need to echo out each of the variables. Your 'from' is a header parameter and should be in the correct format 'From : [email protected]' -
Auto clear php form n conenction bet php n flex project
gristoi replied to nandakishore_nani's topic in Applications
For starters you haven't added the message into the Mail function. secondly, are you testing this from your localhost, and if so do u have an email server installed?