No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have a starting query that displays appointments and I am trying to expand to get different statistics: SELECT apt.user_id, apt.appt_id, apt.client_id, apt.time_start AS stime, FROM_UNIXTIME(apt.time_start,'%Y-%m-%d') AS ftime FROM tl_appt apt LEFT JOIN tl_rooms r on r.room_id = apt.room_id WHERE apt.appt_id IS NOT NULL AND apt.appt_status_id = '3' AND FROM_UNIXTIME(apt.time_start,'%Y-%m-%d') … |
|
I have the need for a FUNCTION: Transpose($Song, $direction) The logic I need is pretty straight forward, but I am having a hard time replicating it using PHP functions. I will try to break it down to it's simplest form: I have a field that has several lines of text. … |
|
I am generating a PHP error with this function but don't know why. Little help... [CODE] function Validate_Page_Nav($LastPage, $ErrorPage) { if($_SESSION['Staff_ID']) { $trimmed = str_replace($staffroot, '', $_SERVER['SCRIPT_NAME']); $resul = $db->query("SELECT * FROM Page_Access WHERE URI = '$trimmed'") or die("failed to get access data"); $page_access = $resul->fetch_assoc(); $URI_access = explode(",", $page_access['User_Level']); … |
|
Hello, I have just started to develop a PHP/mySQL site and was wondering if there are any Open Source Security Frameworks they can recommended. Not only do I want to deal with data hacking issues, but also want to know what the best practices to insure that users are not … |
|
I have an upload page which allows a user to SELECT a file from their hard drive, then UPLOAD it to ftp folder, and then store the path of the image to mySQL db. It functions just fine except BUT we want to guard against large file being saved. If … |
|
Does someone have or can they direct me to a javascript which will display an alert message when a date is not entered correctly. MM/DD/YYYY. I do not need an alert message if they clear the field - validate only if there are characters in the field. After is there … |
|
I've built a function which builds options for a SELECT FIELD. It draws options from a list table and then appends the SELECTED when the value that I am looping through in present in the $selected ARRAY. In my $FieldValue, multiple values are delineated by a "\r". I use and … |
|
For some reason this function OMITS this very first row of my vType query. The $vType is the name of my List The $FieldValue is the value in the field associated record I am building the options for. It can contain a single or MULTIPLE values. I appreciate any help … |
|
Hello, I am trying to work out a PHP page which establishes a sequenced rotation of ADS. Here is the code so far. There are some elements missing that need help with. [CODE]<?php include("core.php"); session_start(); $type = $_GET['type']; $category = $_GET['category']; $User = $_SESSION['MEMEBER_ID']; $Type = "image_imp"; // Get Initial … |
|
I am trying to code some advertising banners on my page based on random picks from a table in my DB. I have successfully got my top banner to display and log an impression: [CODE] // Top Banner $query="SELECT * FROM sm_ADS WHERE id_Maze_Category='$Category_ID' and Type='large' and Active='1' ORDER BY … |
|
I have one page that has several form actions: [CODE]form action="maze_enter.php" method="post" enctype="application/x-www-form-urlencoded" name="finance" target="_self"> <tr> <td colspan="2" align="center" valign="middle"><span class="style11"><a href="#" onclick="document.finance.submit();return false;">Enter Maze</a> </span></td> </tr> </form> <form action="maze_enter.php" method="post" enctype="application/x-www-form-urlencoded" name="shop" target="_self"> <tr> <td colspan="2" align="center" valign="middle"><span class="style11"><a href="#" onclick="document.shop.submit();return false;">Enter Maze</a> </span></td> </tr> </form> [/CODE] I want … |
|
Hi all, I have a query to return only 10 records: [CODE]$result = mysql_query ("SELECT * FROM sm_Solves ORDER BY solved_stamp DESC LIMIT 10;") or die ("error in query. ".mysql_error());[/CODE] In this table, the "solved_stamp" is a timestamp result and there is a field called "username". I want to take … |
|
I have this code: [CODE] $query = "SELECT * FROM Ev_Songs where id_Event='$id_Event' Order by Pos"; $results = mysql_query($query) or die("Error performing query2"); [/CODE] will return a result like this: Song_Title = "Song A", Pos = "2" Song_Title = "Song B", Pos = "4" Song_Title = "Song C", Pos = … |
|
I am getting some strange behavior with a PHP page I am coding: I have some code that displays a MENU (with the letters of the alphabet): [CODE] <FORM NAME="getletter" ACTION="Service_Dates_detail.php?id_Event=<?php echo $id_Event; ?>" METHOD="POST"> <table width="389" border="0" cellspacing="2" cellpadding="2"> <tr> <td width="49" class="style14">Filter:</td> <td width="315"><span class="style14">Select Song</span> <input type="hidden" … |
|
I have a table called "Ev_Songs" which has these columns: id (Primary) id_Event (int) id_Song (int) Pos (int) This table hold selected songs for a song set for an event. So if I have an Event thats id=3 there might be 5 songs selected as the set for that event: … |
|
Hello, I have a few Text Area input fields when I want to allow my users to enter text with hard returns. On my process page, I am using: [CODE]$Note = addslashes(nl2br($_POST['Note']));[/CODE] to convert the strings to be able to be pushed to my mySQL DB. This functions great. I, … |
|
I have implemented a log-in routine that I thought captured SESSION variable to use through out all my PHP pages of my site. Here is the snippet of code which sets the session variables: [CODE] if($result) { if(mysql_num_rows($result) == 1) { //Login Successful session_regenerate_id(); $member = mysql_fetch_assoc($result); $_SESSION['SESS_MEMBER_ID'] = $member['id']; … |
|
I am trying to plot my way through coding a BCC Bulk HTML email. I can't get the code below to work and I want to also call another query to grab the emails for a BCC email. SPAM security would be helpful if it is easy enough to add … |
|
I have a form which allows for the user to pick ZERO or MANY items. I was hoping when I SUBMIT the form, all the values would update in the field. Here is the form code: [code=html]<tr> <td><div align="right">Instruments:</div></td> <td width="116" align="center" valign="middle"> <div align="left"> <select name="Instrument" size="5" multiple="multiple" id="Instrument"> … |
|
I have a query that retrieves records from a table: [CODE] <?php $query = "select * FROM Ev_AvVolunteers where id_Event='$id_Event' ORDER BY Name"; $results = mysql_query($query) or die("Error performing query"); ?> [/CODE] It is sorting by Name now BUT I want a different sort. There is another field called "Instrument" … |
|
Hi All, For some reason, I cannot get the values to pass to the ACTION page correctly in the code below: [CODE]<? $id_Event = '1'; ?> <head> </head> <body> <form id="form2" name="Operation" method="post" action="EvVolProcess.php?id_Service=<?php echo '$id_Event'; ?>"> <input name="id_Event" type="hidden" id="id_Event" value="<?php echo '$id_Event'; ?>" /> <select name="SelVol" id="SelVol"> <? … |
|
Hi, I am trying to compile a detail page. Here is the code below: [CODE]<?php require_once('auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Village Of Hope Worship</title> <style type="text/css"> <!-- .style13 { font-size: 12px; color: #70283C; font-weight: bold; } .style14 … |
|
Hello, Great forum! I have implemented a USER LOG-IN scheme in my site. Below is the code to build my session variable data: [CODE] //Create query $qry="SELECT * FROM volunteers WHERE Username='$login' AND Password='$password'"; $result=mysql_query($qry); //Check whether the query was successful or not if($result) { if(mysql_num_rows($result) == 1) { //Login … |
|
I am working of a musicians volunteer DB. I have a ADD Volunteer page: [code] <?php require_once('auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Village Of Hope Worship</title> <style type="text/css"> <!-- .style1 { font-size: 24px; font-weight: bold; } .style3 { … |