Hi,
I'm trying to modify the following in order to make the output table sorted alphabetically according to $event_name but so far have not succeeded. Any pointers?
Code: function display_all_events(){
global $wpdb;
$events_detail_tbl = get_option('events_detail_tbl');
$curdate = date("Y-m-d");
$paypal_cur = get_option('paypal_cur');
$sql = "SELECT * FROM ". $events_detail_tbl;
$result = mysql_query ($sql);
echo "<table width = '100%'>";
while ($row = mysql_fetch_assoc ($result))
{
$event_id = $row['id'];
$event_name=$row['event_name'];
$event_identifier=$row['event_identifier'];
$cost=$row['event_cost'];
$active=$row['is_active'];
echo "<tr><td width='100%'>".$event_name." - ".$paypal_cur." ".$cost."</p><hr></td><td>";
echo "<form name='form' method='post' action='".$_SERVER['REQUEST_URI']."'>";
echo "<input type='hidden' name='regevent_action' value='register'>";
echo "<input type='hidden' name='event_id' value='".$row['id']."'>";
echo "<input type='SUBMIT' value='REGISTER'></form></td></tr>";
}
echo "</table>";
}
Am relatively new to php so please excuse me for posting stuff that may seem obvious to others but I really need to sort this out as the workaround is very time consuming...
Thanks
pointer 102 question
I read a book
Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a different discussion. Here's the code: shell_exec("nohup curl --create-dirs -o {$write_path}
Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).I keep getting the "Please Fill In All Fields" message. Can you help me fix this?I'm sure I'm just missing
PECL uploadprogress for php5.2
Hey, I just installed PHP5 via .htaccess on my 1and1 Shared Hosting Account.How would I exactly install the "PECL uploadprogress"?http://pecl.php.net/package/uploadprogress---There are
sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is something wrong with my sql statement below is the error and the code. what I am trying to do is to edit
Where is my php.ini???
HiFirst off - apologies - i'm not a coder so this may sound very amateur.I'm having an issue with files being uploaded via a submission form. Files under 2mb are fine. Files over 2mb are not. I've
Sendmail.php - heading error following check_input
Hi,I would greatly appreciate some help? I am brand new to PHP and have been searching and editing code ALL day :shrug:yet I still cannot find the reason for this error in my Sendmail.php
Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and over again to set up these new laptops, we log on to this website and have to select all this stuff. I
SAP FICO learning materials
Hi all,
Session login issue
I'm wondering how to fix a problem I'm having with a session-based login systemSay I go to http://www.website.comThe page that processes the login then returns the now-logged-in user to