No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
39 Posted Topics
Re: Use some javascript? // Make sure input as an ID // e.g. <input type="text" id="message"> // put this in Javascript in for when the user has submitted the form <script type="text/javascript"> input = document.getElementById('message'); input.value=""; </script> | |
Re: Are you still receiving the same problem now? | |
Re: [B]Try this:[/B] [CODE] //Get the bonus values. $bonusquery = mysql_query("SELECT * FROM `cms_bonus_tracker` WHERE `staff_name`='$staff_name'"); while ($list = mysql_fetch_array($bonusquery)) { ?> Some HTML HERE <? } $all_query = mysql_query("SELECT * FROM `cms_bonus_tracker` ORDER BY `staff_name`"); while ($list2 = mysql_fetch_array($all_query)){ $all_staff_name = $all_query[staff_name]; ?> <tr> <td class='theboxsmalltext' width='22%' align='center' valign='middle'><? echo … | |
Hi there! I have tooltips on my site that appear when you hover over text/image but i would like different background for different hovers. the code at the moment accepts all variables passed in but doesnt initalise and apply the styles. I have attached my code and would be thankful … | |
Hi Guys! I am trying to custom signature images, a generated one as such on a form submit. At the moment I am still doing the images although I wish to add an image into the signature and I am not too sure how I will do that. I have … | |
Hi Guys! I was wondering if anyone could shed some light on this problem. I recently changed my login forms ugly default submit button to and image. The problem being that the image is submitting the form but I'm not getting the results I hoped for. It isn't logging me … ![]() | |
Re: [CODE]$result= mysql_query("SELECT * FROM `hotspots` ORDER BY `id` DESC")or die (mysql_error()); $color="1"; echo '<table width="472px" border="0" align="center" cellpadding="2" cellspacing="0" style="border:1px solid #0000ff;">'; while($rows=mysql_fetch_array($result)){ if($color==1){ ?> <tr bgcolor='#6698FF' > <td style='border-top:1px solid #0000ff; color:#000000;font-weight: bold;'><? echo $rows[username]; ?></td><td style='border-top:1px solid #0000ff; text-align: right;color:#000000;font-weight: bold;'><? echo $rows[timestamp]; ?></td></tr> <tr bgcolor='#6698FF' style='border-bottom:1px solid … | |
Hello Guys! :) I am just wondering how I would be able to echo a random [B]hour[/B] timestamp. Any help would be appreciated! Yours, Public-Image | |
Hi there! I am wanting to use javascript to set a cookie which will expire on session/cookie expire and what would this cookie do? I want it to determine whether or not to show a div using a variable to set display block or none. The div contains text "Click … | |
I am using the following code to find whether the content area is using a command (commands are held in a table column) or not. The commands call on "quick content" which are default areas that you might see regularly around the site. This feature ensures they are not different … | |
Re: for your first code use an elseif which will either display one or the other if ($row[dependents]=='with'){ ... }elseif($row[dependents]=='without'){ ... } | |
Hi everyone :) I have created a kind of catalogue thing but when users purchase the item they have the option of how many they want, although at the moment I have been doing if statements e.g. [CODE] $amount = $_POST[amount]; if($amount ==1){ $insert = mysql_query BLA BLA }elseif($amount ==2){ … | |
Re: echo '<a href="#" onclick = "alert('$update_array[amsg_id]')">Show Comments</a>'; that might work :) | |
Hi there :) I am doing a login log script and at first I didn't record the timestamp unlike all my newer logs, I was wondering is there a way to turn the date d/m/Y (15/02/2011) turned into a timestamp? I would appreciate any help given Thank you in advance! ![]() | |
Re: if you want more freedom with an echo you should do: [CODE] <? if(!$_POST[img]){ ?> Your echo would go here and therefore you could use " and ' although all PHP would have to go in brackets again <? echo"$somevariable"; ?> <? } ?>[/CODE] | |
Re: why not try $sql_colors = mysql_query("SELECT * FROM `colors` WHERE `id` ='$product_id'"); $sql_sizes = mysql_query("SELECT * FROM `size` WHERE `id` ='$product_id'"); that is assuming that product_id is a variable ( e.g. $product_id = $_GET[id]; ) might fix it | |
Re: What you would be best doing is creating a new table to hold this data in your SQL something like "login_records" and every time you create a session for a member logging in you insert a new row. So on your login page just before or just after you create … | |
I am trying to detect if a users password is less than or equal to 5 characters then to error the user otherwise continue.. <? $pass = $_POST[password]; if($pass <=5){ echo"Error"; }else{ echo"YAY no errors!"; } ?> I can't get it to work can anyone point out a way to … | |
Re: To have a unique ID for every account you would create a table in MYSQL and a table column (e.g. id) would have to be primary key and auto increasement this would make every row go up by 1 e.g. 1,2,3,4 I am not sure what your trying to ask … | |
I am currently making a change password area and I wish for users to be able to change it although for passwords to be more secure we ask that passwords contain both letters and numbers and if users so choose they may have special characters as well.. I could not … | |
<script> function close(){ window.open('alert_update.php?id=<? echo"$alertm[id]"; ?>','alert'); document.getElementById("alert").style.display="none"; } </script> The above script is what I am using to send a request as such to alert_update (the file that updates the database which is a small iframe 1px by 1px; but I also need it to onclick hide the div that … | |
Okay so I was having a problem earlier where I could not get my DIV to hide using my script I used some source from google and got the following, I found it to be effective and do the job, however I want it so that when I click my … | |
Re: Assuming your clients are held within the database why not make it so they set their settings before filing out the form. which could update the database and then simple use PHP IF statements to either show or hide the data specific to the column on the database. ![]() | |
I am using a DIV to load pages that must be refreshed every so often however due to the delay in each load, it takes that amount of time to load the first preview. So what I want to do is while the page loads it up is there a … | |
Hi Guys! :) Erm I have made a section for members to post messages although I know some members will post messages to just observe what effect it may have on the layout as such or just to be pests. My problem is: I have got a table that displays … | |
Hey Guys :) I want to be able to rewrite my URL's like so: [B]site/profiles/(username)[/B] but this would really only be site/profile.php?username=* I have this so far: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^profiles/$ profile.php </IfModule> How would I do the [B]bold[/B] located above? | |
Hey Guys! :) Sorry to bother you all I can't seem to get my code to work and I would be much obliged if you could help me out. So what I was trying to do was get a column from a table of my database and show only the … | |
Re: <?php $jobTitle = $_POST; $industry = $_POST; $stationBase = $_POST; $gender = $_POST; $maritalStatus = $_POST; mysql_select_db("a2z"); if((!$jobTitle) || ($jobTitle == "")) { $jobTitle = ""; } else { $jobTitle = "+(".$jobTitle.")"; } if((!$industry) || ($industry == "")) { $industry = ""; } if((!$stationBase) || ($stationBase == "")) { $stationBase … | |
Re: You could use a simple PHP SELECT and UPDATE For example: <? include("databasefile.php"); $query = mysql_query("SELECT * FROM `phototable` ORDER BY `id` ASC"); while($fetch = mysql_fetch_array($query)){ // We get all images in the table by the primary key in this case id $id = $fetch['id']; //collect the id or if … | |
Re: <!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" xml:lang="pt-pt"> <?php include '../includes/bdconn.php'?> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link href="../css/style_back.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../js/jquery-1.4.4.js"></script> <script type="text/javascript"> $(document).ready(function() { // Hide the "view" div. $('div.display').hide(); // Watch for clicks on the "slide" link. $('div.visualiza').click(function() { // When … | |
Re: Okay on your index file you have used: [COLOR="Red"] <?php if($_GET['page'] == 'portfolio') include('pages/portfolio.php'); ?>[/COLOR] That should be: [COLOR="Green"] <?php if($_GET['page'] == 'portfolio'){ include('pages/portfolio.php'); } ?>[/COLOR] That might be the only problem :) If you have headers already sent issues remove your session_start from portfolio and it should be fine … | |
Okay so I have a handy little script that allows me to load pages into a DIV an alternative of 'iframes' although I want my div to load a first page/index page before any other links are clicked on, in an iframe DIV way of putting things I would like … | |
Hi I have a div that is hidden until a button is pressed to show it, although when the user clicks the close button or the open button the div will hide, although it will keep the users last viewed page within that div there unless they logout or reload … | |
Hi Guys! I'm currently trying to refresh a DIV on my page that is linked to MYSQL (changes if database has 1 or more rows) without refreshing the entire page, I've tried using javascript although it didn't seem to work and so Im back to the drawing board, Im not … | |
I use Firefox and it has never given me a problem when logging in but with Internet Explorer and Chrome, there seems to be a problem.. It as if it refreshes the page without doing the method of posting the form. I would really like some help as to where … | |
Hi Guys! :) Erm im using JS to make divs on my site draggable, but I dont want my divs to go beyond a certain boundry as such, I was wondering if any of you could maybe help improve the script I am using (included below) so that users must … | |
Hi Guys :) erm Im not the biggest on Javascript its more like a second language unlike PHP and HTML erm anyway, I am trying to redirect users with Javascript, the reason I am using javascript is so that users don't see the URL, its more of a precaution on … | |
Hi Everyone, I have got a DIV that I need to refresh, its content consists of an image that will change on the insertion of a row to the SQL Database, however, when I use a refresh on my div it does refresh but does not change the image... My … |
The End.