
kleb
Members-
Posts
78 -
Joined
-
Last visited
Never
Everything posted by kleb
-
>:(sergie
-
please i dont understand that step two clearly
-
PHP ordering form help please. variables staying the same after submit
kleb replied to timmykins02's topic in PHP Coding Help
instead of using $_SESSION['order']=$_POST['order'] you will just use session_register in place of $_SESSION['order']so you it will take the values and put it on the client side even if you switch off your system it will still be there -
Hi sergies, i hv forgotten how i did iti that time that it gave me errors.i want when users sign in it sholud show that html page although i name it in php format and their name to show on the page
-
sergies dont border about those php codes i embeded in the html codes..i hv tried to use include but it gave me errors thats why i want to use echo"";
-
PHP ordering form help please. variables staying the same after submit
kleb replied to timmykins02's topic in PHP Coding Help
start your session first with session_start() use session_register()..it will save you alot of time..just use it with $_POST['whatever']..i mean session_register($_POST['whatever']); it should work -
i need help here..i want to echo a lage code of html but it is giving me problems..i know it will hv to do with the syntax but am confused on how to go about it..below is the php code and the html codes <?php include"header.php"; session_start(); if(isset($_POST['submit'])) { $log=mysql_real_escape_string($_POST['mail1']); $pas=($_POST['pass1']); if($log=='' || $pas=='') { echo "Please supply your Username(your email address) and your password"; } else { $sel="SELECT user_name,userID FROM user WHERE (user_email='$log') AND (user_password='$pas')"; $ok=mysql_query($sel) or die(mysql_error()); if(mysql_num_rows($ok)==0)echo"Wroung Username or Password used,Please try again"; else { while($row=mysql_fetch_array($ok)) { $_SESSION['userID']=$row['userID']; $_SESSION['user_name']=$row['user_name']; $_SESSION['user_date']=$row['user_date']; echo $_SESSION['user_date']=$row['user_date']; echo"this is where i want to put the html codes so that the user_name appears on the page".$_SESSION['user_name']; } } } } mysql_close(); ?> this is the html codes <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta name="Description" content="Information architecture, Web Design, Web Standards." /> <meta name="Keywords" content="your, keywords" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="Distribution" content="Global" /> <meta name="Author" content="Erwin Aligam - [email protected]" /> <meta name="Robots" content="index,follow" /> <link rel="stylesheet" href="images/PixelGreen.css" type="text/css" /> <title>Planetafric</title> </head> <body> <!-- wrap starts here --> <div id="wrap"> <div id="header"><div id="header-content"> <h1 id="logo"><a href="index.html" title="">speak<span class="gray">out</span></a></h1> <h2 id="slogan">The Revolution is now...</h2> <!-- Menu Tabs --> <ul> <li><a href="index.html" id="current">Home</a></li> <li><a href="index.html">News</a></li> <li><a href="index.html">Downloads</a></li> <li><a href="index.html">Support</a></li> <li><a href="index.html">About</a><li> </ul> </div></div> <div class="headerphoto"></div> <!-- content-wrap starts here --> <div id="content-wrap"><div id="content"> <div id="sidebar" > <div class="sidebox"> <h1>About this Website</h1> <p>Due to the injustice we face conitnualy in this nation WE (KTECHGROUP) have decided to stamp our feet against all this ills in our country..THE TIME IS NOW ..Stand against non avalabitlty of social amenities, stand against unemployment and stand against corruption.<img src="speakout_1.png"/></p> </div> <div class="sidebox"> <h1 class="clear">Sidebar Menu</h1> <ul class="sidemenu"> <li><a href="index.html" class="top">Home</a></li> <li><a href="#TemplateInfo">Template Info</a></li> <li><a href="#SampleTags">Sample Tags</a></li> <li><a href="http://www.styleshout.com/">More Templates...</a></li> <li><a href="http://www.4templates.com/?aff=ealigam">Premium Templates</a></li> </ul> </div> <div class="sidebox"> <h1>Sponsors</h1> <ul class="sidemenu"> <li><img src="watch.jpg"/></br><h3>Longinnes wrist watch forsale at reduced price</h3></li> <li><img src="htc.jpg"/><label>4templates</label</li> <li><a href="http://store.templatemonster.com/?aff=ealigam">TemplateMonster</a></li> <li><a href="http://www.fotolia.com/partner/114283">Fotolia.com</a></li> <li><a href="http://www.text-link-ads.com/?ref=40025">Text Link Ads</a></li> </ul> </div> <div class="sidebox"> <h1>Wise Words</h1> <p>"No man can live happily who regards himself alone; who turns everything to his own advantage. You must live for others if you wish to live for yourself."</p> <p class="align-right">- Seneca</p> </div> <div class="sidebox"> <h1>Support Speakout</h1> <p>If you are interested in supporting this work and would like to contribute, you are welcome to make a small donation through the <a href="http://www.styleshout.com/">donate link</a> on this website - it will be a great help and will surely be appreciated.</p> </div> <div class="sidebox"> <h1>Search Box</h1> <form action="#" class="searchform"> <p> <input name="search_query" class="textbox" type="text" /> <input name="search" class="button" value="Search" type="submit" /> </p> </form> </div> </div> <div id="main"> <div class="post"> <a name="TemplateInfo"></a> <h1> </h1> <p>Posted by <a href="index.html">Adetoye Oni</a></p> <p><strong>A weeping Eye</strong> is a free, W3C-compliant, CSS-based website template by <strong><a href="http://www.styleshout.com/">styleshout.com</a></strong>.<p align="left"><img src="soldier_crying.jpg"/></p align> This work is distributed under thel;kmbkl;;lsjljhl;hjklghl;kk;gjhflk;jfgkl;jflhjflkhlkkjgfklk Creative Commons Attribution 2.5 License</a>, which means that you are free to use and modify it for any purpose. All I ask is that you include a link back tohjsklvjksjkskjvskdv dhlkdhlshdlkjhdslkjhkljsdhjsdhjlghdsjhjkdshgjkdhjkshdjkhdsjkhdkjsjgdgl sddjgkldsjlkgdlkshgldhsgldhlghdlshgdlhgldhlkhdlkdkhdlkgdgd djkdjklgdjklgjdslkjdlksjkldsjkldsjlkdsjklgjsldkjgkldsgdsgjdklsgjsljgl\ksdjgjldkgj;ldsk\jglkdsg <a href="http://www.styleshout.com/">my website</a> in your credits.</p> <p>For more free designs, you can visit <a href="http://www.styleshout.com/">my website</a> to see my other works.</p> <p>Good luck and I hope you find my free templates useful!</p> <p class="post-footer align-right"> <a href="index.html" class="readmore">Read more</a> <a href="index.html" class="comments"><?php if(isset($_SESSION['views'])) $_SESSION['views']=$_SESSION['views']+1; else $_SESSION['views']=1; echo"Comments:".$_SESSION['views']; ?></a> <span class="date">Nov 11, 2006</span> </p> </div> <h3>Comments:</h3> <table> <tr class="row-a"> <td class="first"><?php include"header.php"; $sql="SELECT *FROM post "; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)) { echo"{$row['post_date']}"."</br>"; } ?></td> <td><?php include"header.php"; $sql="SELECT *FROM post "; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)) { echo"{$row['post_content']}"."</br>"; } ?></td> </tr> </table> <h3>Post your comments here</h3> <form action='reply.php'method='post'> <textarea name="comment" id="content" style="width:400px;height:50px;background-color:#D0F18F;color:#000000;font:15px/20px cursive;scrollbar-base-color:#638E0D;"></textarea> <br /> <input class="button" type="submit"name="submit"value="submit" /> </p> </form> <br /> </div> <!-- content-wrap ends here --> </div></div> <!-- footer starts here --> <div id="footer"><div id="footer-content"> <div class="col float-left"> <h1>Site Partners</h1> <ul> <li><a href="http://www.dreamhost.com/r.cgi?287326"><strong>Dreamhost</strong> - Affordable & Reliable Webhosting</a></li> <li><a href="http://www.4templates.com/?aff=ealigam"><strong>4templates</strong> - Low Cost Hi-Quality Templates</a></li> <li><a href="http://store.templatemonster.com/?aff=ealigam"><strong>TemplateMonster</strong> - Best templates on the net!</a></li> <li><a href="http://www.fotolia.com/partner/114283"><strong>Fotolia</strong> - Free stock images or from $1</a></li> <li><a href="http://www.text-link-ads.com/?ref=40025"><strong>Text Link Ads</strong> - Easiest. Money. Ever.</a></li> </ul> </div> <div class="col float-left"> <h1>Links</h1> <ul> <li><a href="http://www.openwebdesign.org/">openwebdesign.org</a></li> <li><a href="http://www.opendesigns.org/">Opendesigns.org</a></li> <li><a href="http://www.pdphoto.org/">PDPhoto.org</a></li> <li><a href="http://www.alistapart.com">Alistapart</a></li> <li><a href="http://www.cssremix.com">CSS Remix</a></li> </ul> </div> <div crrlass="col2 float-right"> <p> © copyright 2006 <strong>Ktech group</strong><br /> Programme by: <a href="index.html"><strong>Adeleye Caleb</strong></a> Valid <a href="http://jigsaw.w3.org/css-validator/check/referer"><strong>CSS</strong></a> | <a href="http://validator.w3.org/check/referer"><strong>XHTML</strong></a> </p> <ul> <li><a href="index.html"><strong>Home</strong></a></li> <li><a href="index.html"><strong>Sitemap</strong></a></li> <li><a href="index.html"><strong>RSS Feed</strong></a></li> </ul> </div> </div></div> <!-- footer ends here --> <!-- wrap ends here --> </div> </body> </html> Thanks in advance and this is the html
-
:D :D :D :D :D i thank you all for all your concern May the good lord richly bless you all. thanks
-
hi Mellor God bless you a million times..it worked..wow am so happy now it shows the date instead of the 000.00.00.00 it showed before..but the date is not correct
-
i hv done that already and its not working
-
Hi drongo i truely appreciate your effort..but it still thesame thing infact everything is set its even on UPDATE when i checked it..please what do i do?
-
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
sorry i am not echoing out the userID am just trying to say that in order for me to echo out the topic posted by a specific user..Yes, i hv two tables. one for the USERS and another that contains the TOPICS and the CONTENT -
still showing this 0000-00-00 00:00:00 even when i changed it to TIMESTAMP
-
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
Please dont get bored with the way am bordering you..now if i want to do the link up so that the userID will be tied to the TopicID and the contentID and when i echo lets say all the topics,when a visitor clicks on any of the topics it will take him/her to the exact content linked to it..just like when i click on a topic on PHP FREAKS thanks -
how do i use the time stamp..do i write it together as in TIMESTAMP?
-
i have tried most of the options here but with no thesame result...
-
i have been trying to insert date with when users post there comment but when i echo the date() with the comments..it just display 0000.00.00.00 just like that and when i checked my DB it was like that too..please what can i do.this is my code Thankd in advance <?php include"header.php"; if(isset($_POST['submit'])) { $postdate=mktime(0,0,0,date("m"),date("d")+1,date("y")); $comment=mysql_real_escape_string($_POST['comment']); if($comment!=='') { $ins="INSERT INTO post(post_content,post_date)VALUES('$comment','$postdate')"; mysql_query($ins) or die(mysql_error()); } else { echo"You can not post an empty page"; } }
-
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
but will i be able to link the a TOPIC from the TOPIC column to the CONTENT in the CONTENT column? -
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
when i changed the id it said that Id column doesnot exist so i changed it back to POSTID and it didnt show the error but its still telling me that $id is undefined..what if i had one table only and i put both the TOPICS and the CONTENT in one table?? or can you help me write the code in your own way thanks so much -
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
I thought i need to join the tables for it to work -
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
help it gave me an error Notice: Undefined index: postID in C:\wamp\www\topic_content.php on line 3 <?php include"header.php"; $id=$_GET['postID']; $sql="SELECT* FROM post JOIN topics ON postID=topics.topicsID WHERE topicid='$id'"; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)) { echo "{$row['post_content']}"; } -
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
i dont get you Drongo please throw more light am -
why dont you run your checks first after if( $_POST['delete']) before you run the MYSQL QUERY.it will make things easier that way
-
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
I have a problem with this codes, i dont want when users click on a topic the whole body or content in the joined table to be echoed.i only want a topic for a content since they were both created once by the user. This are my codes: index.php <tr class="row-a"> <td class="first">05.31.2006</td> <td> <?php include"header.php"; $sql="SELECT *FROM topics "; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)){ echo"<a href='topic_content.php?'id='postID'>{$row['topics_subject']}</a>"."</br>"; } ?> </td> topics_content.php <?php include"header.php"; $sql="SELECT* FROM post JOIN topics ON postID=topics.topicsID"; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)) { echo "{$row['post_content']}"; } ?> Thanks in advance -
Can i link an echoed row from a table to another row in another table?
kleb replied to kleb's topic in PHP Coding Help
I have a problem with this codes, i dont want when users click on a topic the whole body or content in the joined table to be echoed.i only want a topic for a content since they were both created once by the user. This are my codes: index.php <tr class="row-a"> <td class="first">05.31.2006</td> <td> <?php include"header.php"; $sql="SELECT *FROM topics "; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)){ echo"<a href='topic_content.php?'id='postID'>{$row['topics_subject']}</a>"."</br>"; } ?> </td> topics_content.php <?php include"header.php"; $sql="SELECT* FROM post JOIN topics ON postID=topics.topicsID"; $result=mysql_query($sql)or die(mysql_error()); while($row=mysql_fetch_array($result)) { echo "{$row['post_content']}"; } ?> Thanks in advance