39,316 Topics

Member Avatar for
Member Avatar for gchurch

hey all i have 3 drop down boxes: one for the day, month and then the year. however i'd like to have it so that the person choosing the date can't choose a past date. In other words if they try choose for instance the 14th Oct when it's now …

Member Avatar for hielo
0
75
Member Avatar for itisnot_me

how would i find out if an number is in between certain values. ex number 33 Set values 0-10 10-20 20-30 30-40 output 30-30 thanks in advance

Member Avatar for diafol
0
84
Member Avatar for trilithon

Hi All, I need to create a dropdown box for a user to select a row from a table and populate the fields in a form for the user to update that row. What will be the best way to do this? Thank you in advance Max

Member Avatar for trilithon
0
135
Member Avatar for vartol

The code is posted below, the problem is that i get a parse error at line 80 (last line) and i cannout see why from my point is correct. Thanks. <?php function select_($sql,$select_name,$selected_value,$initial_value,$val1,$val2,$post) { $result=mysql_query($sql); ?> <select name="<? print $select_name;?>"> <? if(!empty($post)) { while($row=mysql_fetch_array($result)) { print'<option '; if($row[$val1]==$post) { print'selected="selected"'; …

Member Avatar for diafol
0
75
Member Avatar for benhowdle89

Hi, I'm doing a site for a client and they want a blog and an articles area. What i imagined doing was designing the homepage in html/css/jquery etc...and then install WordPress through cPanel for the blog and the article area. I have a choice i need some help with, do …

Member Avatar for sops21
0
184
Member Avatar for Sorcher

[B]Greetings![/B] Anyone here who can correct my code? I'm abit noob to PHP, just started learning. The Ban file function of mine does the echo but it wont stop the file upload. Any idea? have i inplented it wrong or do i miss a line? Love you long time if …

Member Avatar for Sorcher
0
215
Member Avatar for samarudge

On the URL shortener at DFT.BA, when a user visits a link we need the reffer header to be sent to the website we're directing too (For analytics etc.) Currently the URL redirect code is [CODE]header("Location: {$Link['link_target']}"); header("Refer: http://dft.ba/"); header("Referer: http://dft.ba/"); //Fallback for older browsers echo "<html><body><a href=\"{$Link['link_target']}\">Click To Go</a></body></html>";[/CODE] …

0
80
Member Avatar for ultimatebuster

Currently I'm working on a microblog just to get familiar with PHP MySQL. I have a pretty big problem though. Here's the php code: [code] function get_all_users(){ $query = "SELECT * FROM ".$this->prefix."users"; if ($stmt = $this->prepare($query)){ $stmt->execute(); …

Member Avatar for ultimatebuster
0
162
Member Avatar for bloodyjoe

I have this problem, i have an upload and i would like to replace all spacing with no spacing, the problem is that i have used `$abcd = str_replace (" ", "", $abcd);` this should work but i dont know where to put it in or what parameters to use …

Member Avatar for imvivekkapoor
0
132
Member Avatar for designingamy

Hello all, I seem to be having a problem with pagination. I would like to have pictures and information in boxes pulled from the database, but have 4 of them in a row, making a total of 8 put on each page. Can anyone help me figure this out? Thanks …

Member Avatar for designingamy
0
131
Member Avatar for RedBull1

When I click my "Submit" button my .php comes up but all the code is included. See code below. I'm completely new to PHP so excuse the ignorant question. Thank you. [CODE]<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!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=utf-8" /> <title>Contact …

Member Avatar for chrishea
0
93
Member Avatar for Chosen13

Hello, I have a website Stickmin ([url]http://www.stickmin.com/[/url] if you want to check it out, just finished the style yesterday and I think it looks good, opinions?) I want to know the best way to handle user logins, should I make a dedicated class, user sessions, cookies, etc? Thanks...

Member Avatar for Chosen13
0
98
Member Avatar for ryan311

i have a problem in uploading multiple file can anyone help me to solve this problem? here is my index.php [CODE]<!DOCTYPE html> <head> <title>MySQL file upload example</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <form action="add_file2.php" method="post" enctype="multipart/form-data"> <input type="file" name="uploaded_file[0]"><br> <input type="file" name="uploaded_file[1]"><br> <input type="file" name="uploaded_file[2]"><br> <input type="submit" value="Upload file"> …

Member Avatar for ryan311
0
182
Member Avatar for lsmith93

Just wondering but is there a way to include the meta tags from one page to another? The reason why i ask this is that i built a website using PHP Includes and want to include the meta tags so when i load index.php?id=About , it will load the meta …

Member Avatar for Borzoi
0
154
Member Avatar for Sunganani

Pretty new at php and working on my class project. I get this error code on my action page for my log in page plus, it does not redirect when the result is wrong. I still get into the members' area. Code below. Thanks "mysql_num_rows(): supplied argument is not a …

Member Avatar for Brianbc
0
177
Member Avatar for baheer

<?php mysql_connect("localhost","username","password") or die ("Cannot connect" . mysql_error()); $dbname=$_GET['database']; $tablname=$_GET['tabname']; ?> <div id="stylized" class="myform"> <?php echo "<span class='db'>Table:" . $tablname . "</span>"; ?> <?php mysql_select_db($dbname); $q=mysql_query("SELECT * FROM $tablname"); if(!$q){ die("Query Failed!"); } $fields_num=mysql_num_fields($q); echo "<table><tr>"; for($j=0;j<$fields_num;$j++){ $fields=mysql_fetch_field($q); echo "<th>{$field->name}</th>"; } echo "</tr>\n"; while($row=mysql_fetch_array($q)){ echo "<tr>"; foreach($row as $cell){ echo …

Member Avatar for tanha
0
137
Member Avatar for CutRobot

Hopefully someone can help me out with a bit of a quandry. I am writing up PHP for a registration system which will be reused on an annual basis. I want to take the entries in a number of tables and archive them before clearing the tables to be used …

Member Avatar for sudeepjd
0
75
Member Avatar for facarroll

I know how to do basic forms. What I want to do is to pass a set value as a hidden field to accompany an input text value, and have both values entered in the database record. You can see in the code below that the form asks for names …

Member Avatar for facarroll
0
101
Member Avatar for sundeep_g

Helo guys....I am very happy to intract with you all. can any one suggest me how to upload a image...i trie so many web site..here is my code.. uploadimage.php <?php define ("MAX_SIZE","10000"); define ("WIDTH","150"); define ("HEIGHT","100"); function make_thumb($img_name,$filename,$new_w,$new_h) { $ext=getExtension($img_name); if(!strcmp("jpg",$ext) || !strcmp("jpeg",$ext)) $src_img=imagecreatefromjpeg($img_name); if(!strcmp("png",$ext)) $src_img=imagecreatefrompng($img_name); $old_x=imageSX($src_img); $old_y=imageSY($src_img); $ratio1=$old_x/$new_w; $ratio2=$old_y/$new_h; …

Member Avatar for sudeepjd
0
218
Member Avatar for pabzzmike

Hello, I need to rotate images in a website based on the time of day. Please help out with this code. regards, michael

Member Avatar for liamfriel
0
112
Member Avatar for yuryla

HERE IS MY CODE. I NEED TO OPEN EACH DIRECTORY AND MAKE THE LINKS FOR EACH SUBDIRECTORY. THE PROBLEM IN THIS CODE IS: EACH DIRECTORY HAS THE SAME FILE AS IN THE PREVIOUS ONE.. LIKE FOR EXAMPLE, WEBSITE OUTPUTS: DIRECTORY1 FILE1 ---- DIRECTORY2 FILE1 FILE2 ---- DIRECTORY3 FILE1 FILE2 FILE3 …

Member Avatar for theausum
0
74
Member Avatar for star_lavender

Hi. I want to create a search form using the drop down list and checkbox. First, the users have to select from drop down list whether they want to search by date or id. After that, for example, a new pair of drop down list will display for the users …

Member Avatar for theausum
0
186
Member Avatar for floatingDivs

Hi Daniweb, I have a question for you guys. I've been reading up on PHP security and want to get it down pat before embarking on some projects I wish to do. The question right now is about how to create a table with PHP that will enable SHA1 hashing …

Member Avatar for theausum
0
100
Member Avatar for xabi

I'm receiving the error [code=php]Unknown column 'members.committee' in 'on clause'[/code] from the following code. [code=php]"SELECT members.firstname, members.surname, members.photo, YEAR(members.datejoined) AS yearjoined, members.profile, members.committee, category.cat_type, committee.`position`, articles.art_ID, articles.title FROM members, category LEFT JOIN committee ON members.committee = committee.ctte_ID LEFT JOIN articles ON members.mem_ID = articles.author WHERE %s = mem_ID AND members.category …

Member Avatar for theausum
0
108
Member Avatar for ahmedeqbal

Friends, I’ve list of categories with url look like this ‘index.php?cat_id=1,2,3’ I want to rewrite my url as ‘demo-page.html’ However I want to be use here my page title in url page. How its possible? Waiting for reply...

Member Avatar for theausum
0
127
Member Avatar for mithesh

Hi can anybody help me wth whats the diff b/w php and a cake PHP ? Plsssssssssssss

Member Avatar for theausum
0
92
Member Avatar for nsam

Hi all, Can somebody help me out in this as this is very urgent for me.. I want to append 2 $_get variables in a single update query so that i can assign some items to the latest inserted item Following is the code I am using.. $insert = "INSERT …

Member Avatar for theausum
0
100
Member Avatar for muneer_alam

Hi,, My problem is that i have two table city and location.In city table i have 3 field city_id(Primary key),city_name,city_status where city_status is true or false.In location table i have 3 field also loc_id(Primary key),city_id,loc_city.i done a code in which city_name comes into drop down list from city table.my problem …

Member Avatar for xerilagang
0
3K
Member Avatar for RykeTech

Hey everyone, been a while since I have been here but I need some advice in a bad way. Being new to PHP I am at wit's end with this one. I created a main website that displays images and info about the images. All of the images and info …

Member Avatar for RykeTech
0
157
Member Avatar for nukabolhi

I tried lot of way to pass the checkbox values from page 1 to page 2. But I only get successes on fruit id, how can pass the fruit charges. [CODE] // how can I pass room charges"$result[room_charges]" to page 2 // page 1 $sql=mysql_query("select * from fruit"); while ($result …

Member Avatar for nukabolhi
0
140

The End.