Jump to content

rockindano30

Members
  • Posts

    141
  • Joined

  • Last visited

    Never

Everything posted by rockindano30

  1. Hello all, well i am working on a project for one of my clients, and they want to have a blog on their site that i'm creating for them. well as it goes for blogs, i know that there are blog companies that have templates done, but in order to have one in this site, do i have to create a blog from scratch? see i'm a little confuse on this. i don't want to link to "bloger" or any other blog site host cause their templates are going to be different. i want to have it in the site with the same layout. don't know if i am making sense or not. can someone help me understand how to create blog in their website. THANK YOU in advance.
  2. hello all, i am currently working on a project and i want to add a scrolling text effect using jscript. any help or suggestions on how and where to start?
  3. k thank you. can someone point me to a usefull jscript for this?
  4. Hello all, well i have a question to which i probably know the answer to, but don't hurt to ask. i want to create a scrolling text line in a web page. i know it can be done with jscript, but can it be done using only php? another is any help on how to start this? please any advice.
  5. dude Jack, thank you very much. it work!!!! .
  6. can anybody point me to the direction of a tutorial similar to this
  7. the concat title needs to be removed. however , i now that i'm missing a for loop inside my while loop. just a little stuck in thinking how to get all events from table and assigning them to the correct days. ??????
  8. i know my code might need some adjustments. but got the calendar working i just need that extra event info to be display.
  9. Hello all, i'm working on a calendar actually a event calendar. a calendar that when you hover over a date that has an event displays a hovering box with event info. now i have it working to where it displays the calendar and grabs the info from db and when hover over a date box appears but, my problem is all days are links and box has all the events in the db for every day. this is my code for any suggestions or help <h3 style="font-family:palatino linotype; color:#9e865f">Calendar</h3><br /> <?php // Get values from query string $day = $_GET["day"]; $month = $_GET["month"]; $year = $_GET["year"]; $sel = $_GET["sel"]; $what = $_GET["what"]; if($day == "") $day = date("j"); if($month == "") $month = date("m"); if($year == "") $year = date("Y"); $currentTimeStamp = strtotime("$year-$month-$day"); $monthName = date("F", $currentTimeStamp); $numDays = date("t", $currentTimeStamp); $counter = 0; $numEventsThisMonth = 0; $hasEvent = false; $todaysEvents = ""; ?> <table width="100%" border='0' cellspacing='0' cellpadding='0'> <tr align="center"> <td width="87" colspan='1' align="center"><input type='button' value='<<' onClick='goLastMonth(<?php echo $month . ", " . $year; ?>)'> </td> <td colspan='5' align="center"><span class='title'><?php echo $monthName . " " . $year; ?></span><br> </td> <td width="87" colspan='1' align='center'><input type='button' value='>>' onClick='goNextMonth(<?php echo $month . ", " . $year; ?>)'> </td> </tr> <tr> <td class='style2'>S</td> <td width='80' class='style2'>M</td> <td width='80' class='style2'>T</td> <td width='80' class='style2'>W</td> <td width='80' class='style2'>T</td> <td width='80' class='style2'>F</td> <td class='style2'>S</td> </tr> <?php $numDays = date("t", $currentTimeStamp); for($i = 1; $i < $numDays+1; $i++, $counter++) { $timeStamp = strtotime("$year-$month-$i"); if($i == 1) { // Workout when the first day of the month is $firstDay = date("w", $timeStamp); for($j = 0; $j < $firstDay; $j++, $counter++) echo "<td align='center'> </td>"; } //end if if(!($db = @ mysql_connect('localhost', 'user', 'pass'))) { echo 'Error: Could not connect to our database sorry for any inconvience.<br /> Please try at a later time.'; exit; } //select which database you want to edit mysql_select_db("db_name_here"); // $event_id = $_GET["event_id"]; $eventdate=$_GET["dateevent"]; if(!isset($eventdate)) { $query = "SELECT group_concat(title separator ' - ') as title FROM calendar"; $result = mysql_query($query); while($r=mysql_fetch_array($result)) { //the format is $variable = $r["nameofmysqlcolumn"]; $event_id=$r["event_id"]; $date=$r["dateevent"]; $title=$r["title"]; $eventdate = strtotime($date); ?> <?php //prints out all days here................... if($counter % 7 == 0) print "</tr><tr align='center'>"; if(date("w", $timeStamp) == 0 || date("w", $timeStamp) == 6) print "<td width='50' class='weekend' align='left'>$i</td>"; else if($i == date("d") && $month == date("m") && $year == date("Y")) print "<td width='50' class='today' align='left'><div id=\"links\"><a href\"\">$i<span>$title</span></a></div></td>"; else print "<td width='50' class='normal' align='left'><div id=\"links\"><a href\"\">$i<span>$title</span></a></div></td>"; } }//end if/////////////////////////// }//end of for loop ?> any help???
  10. hey darkwater that was the problem. thank you man. you rock.
  11. ken, it doesn't echo anything just my interface blank. my query will be empty according to this sql syntax.
  12. therefore my query is empty and i cant figure out why though
  13. its dieing cause it returns 0 results from db. like i mentioned before that sql query returns 0 results.
  14. nothing it dies at the if statement. see code above for comments
  15. but you know if i use the mysql client and type in the sql syntax select * from users where Uname='user1' and Pword='user1'; it says that there are 0 records in db. but if i type in select * from users where Uname='user1'; displays my record. and if i type in select * from users where Pword='user1'; 0 records????????
  16. <div class="p" style="clear:both; padding-left:25px;"> <?php if(!isset($_POST["Uname"]) || !isset($_POST["Pword"])) die("invalid operation"); $goback = "<p><br /><br />Please <a href=\"login.html\">go back</a> and try again.</p>"; if(empty($_POST["Uname"])) header("Location: logerror.html"); if(empty($_POST["Pword"])) header("Location: logerror.html"); $Uname = $_POST["Uname"]; $Pword = md5(trim($_POST["Pword"])); if (!($db = mysql_connect('localhost','user','pass'))) { print"Error: could not connect to the database."; exit; } mysql_select_db(db_name); $query = "SELECT * FROM users WHERE Uname='$Uname' AND Pword='$Pword'"; $result = mysql_query($query) or die("Problem with the query: $query<br>" . mysql_error()); /////////////this is where it dies///////////////////////////// if(mysql_num_rows($result)==0 ) die('error' .mysql_error()); $row = @ mysql_fetch_array($result); session_start(); $_SESSION["user_id"]=$row["user_id"]; $_SESSION["ip_addr"]=$_SERVER["REMOTE_ADDR"]; $_SESSION["Lname"]=$row["Lname"]; $_SESSION["Fname"]=$row["Fname"]; header("LOCATION: welcome.php"); ?> </div>
  17. using the code you said, it does not give me an error but once it goes to the if(mysql_num_rows($result)==0 ) die('error' .mysql_error()); it dies there
  18. yes it is i add the mysql_error() and changed it like that too and still same thing
  19. its actually adding two more characters at the end of Pword when being Querys. but dont know why though. out of error: error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where Pword='22317aa1cfa38056c3d03ce831d952c6'' at line 1 the c6 characters
  20. i have this web app im doing. my login page <body> <div id="main_wrapper"> <div id="header"></div> <div id="right_content1"> <div class="padding"> <div class="log" align="center"><!--<p style="color:#000099;"><u>Login</u></p><br />--> <img src="images/key.png" title="" border="0" /> <form method="post" action="validate.php"> <p style="color:#999999">User Name: <input type="text" name="Uname" size="15" maxlength="25" style="border:1px solid #999999" /></p><br /> <p style="color:#999999">Password: <input type="password" name="Pword" size="15" maxlength="25" style="border:1px solid #999999" /></p><br /> <input type="submit" name="submit" value="Login" /> </form><p></p></div> </div> </div> my validation of user name and password is this <div id="right_content1"> <div class="padding"> <div class="p" style="clear:both; padding-left:25px;"> <?php if(!isset($_POST["Uname"]) || !isset($_POST["Pword"])) die("invalid operation"); $goback = "<p><br /><br />Please <a href=\"login.html\">go back</a> and try again.</p>"; if(empty($_POST["Uname"])) header("Location: logerror.html"); if(empty($_POST["Pword"])) header("Location: logerror.html"); $Uname = $_POST["Uname"]; $Pword = md5(trim($_POST["Pword"])); if (!($db = mysql_connect('localhost','username','pass'))) { print"Error: could not connect to the database."; exit; } mysql_select_db(users); //this line here says that i have no records $query = "SELECT * FROM users WHERE Uname='{$Uname}' AND Pword='{$Pword}'"; $result = mysql_query($query); if(mysql_num_rows($result)==0 ) header("Location: logerror.html"); // $row = @ mysql_fetch_array($result); session_start(); $_SESSION["user_id"]=$row["user_id"]; $_SESSION["ip_addr"]=$_SERVER["REMOTE_ADDR"]; $_SESSION["Lname"]=$row["Lname"]; $_SESSION["Fname"]=$row["Fname"]; header("LOCATION: welcome.php"); ?> </div> problem is that it wont get all my records and there for takes me to my logerror.php page. my query is 0. any suggestions or help.
  21. lol need to get attention since no one replies to my real post
  22. i need some help someone please!!!!!!!!!!!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.