39,323 Topics

Member Avatar for
Member Avatar for JRM

I have a situtation where I need to use the variables created during a session on another page. currently, I am doing the queries twice, which seems like such a waste! Is is possible to retrieve them via the session store? This is my first foray into the bowels of …

Member Avatar for hashinclude
0
114
Member Avatar for zeynokiz

I am putting together a database with users, items, and tags. I have three tables to support this structure. The first is the "items" table, which contains all of the details about each individual submitted item. The second is the "tags" table, which has two columns: tag_id and tag_text. The …

Member Avatar for hashinclude
0
118
Member Avatar for Exploded Fiber

Running a SQL query from the following code: [CODE] <php if(sizeof($_POST['addcandidate'])){ foreach($_POST['addcandidate'] as $id){ $name= mysql_query("SELECT LastName FROM candidate WHERE Candidate_ID= '$id'"); while($rowz= mysql_fetch_assoc($name)){ $candidatename= $rowz['LastName']; $alter= "ALTER TABLE '$votertable' ADD '$candidatename' int"; mysql_query($alter) or die(mysql_error()); } } } ?> [/CODE] I return Im getting: [COLOR="Red"]#1064 - You have an …

Member Avatar for Exploded Fiber
0
95
Member Avatar for BlueCharge

Please could someone find out why the website i have made for a client is completely screwed up in Internet Explorer but pretty much perfect in Mozilla Firefox. Problems in IE: 1. Cells in tables are centered 2. Footer is not in line and looks bad 3. On the contact …

Member Avatar for kevinwcaulfield
-1
79
Member Avatar for scorpio222

hello guys, i have a problem with a query. I have a table actions which has no primary key. any one particular record can be identified by the combination of actionID, taskID and ProjectID which are the other fields in actions table. Here is an example of the possible situations …

Member Avatar for diafol
0
99
Member Avatar for MavrickIT

If you click the below link u will find a form [url]http://lowcostwebbuilder.com/pablo/Craigslist/[/url] after filling the form you will see a template , basically I post those values on the template but my issue is How can I make this template into an image?? Help me please. I need the solution …

Member Avatar for samarudge
0
68
Member Avatar for niths

--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 'Resource id #10' at line 1-- [CODE]<html> <body> <form action="login.php" method="post"> <div> <table width="100%"> <tr> <td><img src="Logofinalcopy.gif"></td> </tr> <tr> <td bgcolor="aqua"><h2>Login</h2></td> </tr></table> <table align="right" style="width:40%"> …

Member Avatar for ko ko
0
105
Member Avatar for spectacularbob

Hi Everyone, I am having trouble developing a user registration form for my site. Here are the steps that I want to implement: Page 1: form page 1. the form where the user fills out their information into a form. 2. The form then posts the data back Page1 so …

Member Avatar for ko ko
0
157
Member Avatar for emhmk1

Hi everyone, i have a very basic pagination code for my site however i would like to adapt the links as they are displayed, so far the script just outputs numbered links but there is no such styling to the link. i would like the active link to be in …

Member Avatar for ko ko
0
91
Member Avatar for billmudry

Greetings fellow coders. I have a knowledge base on woods of the world stored in MySQL. There are over 6,500 records. Out of all the fields in use, one is simply called speciesname. The database is called taxa. All of the data in this field are two part strings (genus …

Member Avatar for darkagn
0
113
Member Avatar for CapFish

Hello all! I'm trying to restart a service in my fedora installation, from a php local file. So i discovered the shell_exec command, and tried: [CODE]shell_exec('service nagios restart')[/CODE] I also tried shell_exec('sudo restart.sh') where restart.sh has the line "service nagios restart" in it. The first time i did it, i …

Member Avatar for CapFish
0
323
Member Avatar for jamey8420

Hello, First a little background on my issue. I have two multi select boxes. The first select box (box1[]) is populated from a table. The second select box (box2[]) will be populated by "clicking over" options from box1. These options are rights to be assigned to a specific person. The …

Member Avatar for jamey8420
1
165
Member Avatar for fatcat2010

hi experts, always curious . why sometimes reference book use simple quotation mark. sometime switch to double quotation mark. Does it matter in php? e.g. define ([COLOR="Red"]'[/COLOR]SQL_HOST[COLOR="Red"]'[/COLOR],'localahost'); however, in same define function i see double quotation in another source define([COLOR="Red"][COLOR="Red"]"[/COLOR][/COLOR]CONSTANT[COLOR="Red"]"[/COLOR], "Hello world."); Thanks.

Member Avatar for fatcat2010
0
122
Member Avatar for ee96ddo

Hi, I am trying to upload files with an upload.php program. This works fine on my localhost but not on my godaddy server. This is the code: <?php $target = "upload/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file "; echo basename( $_FILES['uploaded']['name']) ; …

Member Avatar for ee96ddo
0
58
Member Avatar for iandmac

Hi one and all, Have taken a look through the mass of other threads and whilst not covering what I need, certainly given me a dozen other ideas for other things, so definately not wasted hours but learning diversion, anyway sorry. I have been trying to utilize a pre existing …

Member Avatar for iandmac
0
222
Member Avatar for Kamboodle

Hey there, I'm having problems importing my sql file via phpmyadmin. It keeps throwing up the following error: #1064 - 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 'id`) ); CREATE TABLE `sessions`( …

Member Avatar for pritaeas
0
117
Member Avatar for prem2
Member Avatar for dandixon

I will probably get my hands slapped for posting here but I didn't know where else to put it, anyway i have some search php script in an iframe within the template of my html so that it appears on all pages. i want to be able to track the …

Member Avatar for pritaeas
0
76
Member Avatar for azegurb

hi there i have table consist of 5 columns it looks like this [CODE]id title theme image category 1 PHP tutorial tutorial self 1.jpg PHP 2 Javascript tutor tutorial self js.jpg Javascript 3 PHP tutorial 2 tutorial self ad.jpg PHP[/CODE] category here is changed for ex: how i can count …

Member Avatar for xylude
0
103
Member Avatar for tryingtofindout
Member Avatar for neha.khetan09

[QUOTE=nikesh.yadav;663969]hey, i think if u r using php session then it is clear automatically when browser closed. means when it user opens the browser it goes to login page.but u can add this code to every page except login page. [code] <?php if(!isset($_SESSION['sessionvalue'])){ ?> <script> window.location('loginpage.php'); </script <?php } ?> …

Member Avatar for cwarn23
0
69
Member Avatar for Exploded Fiber

Hey all, Im a little confused about taking the values of a 2D array and placing them into a query or string to use in query. I've done some homework but unfortunatly square eyes and a caffeine comedown just isn't helping. Essentially I have an array named $myarray. It looks …

Member Avatar for Exploded Fiber
0
120
Member Avatar for atrailm

Hi. I have the next problem: 1. I'm doing a select in a DB table and I'm displaying the result on a page 2. because one of this field is a comment and is too long, I display only the beginning of this folowed by "Read all" as a link. …

0
111
Member Avatar for Aamit

Hi, When in google you type time or date ... it display answer - correct time means get your time zone and converted to correct time... e.g. suppose you are in india .. it automatically detect time zone convert it added +5.30 and display result. same as whether you are …

Member Avatar for mialye
0
163
Member Avatar for niths

[code] ----Query was empty--- at ---$sql="SELECT * FROM users WHERE username='$username' AND password='$password'"; $result=@mysql_query($sql) or die(mysql_error()); --- <html> <body> <form action="login.php" method="post"> <div> <table width="100%"> <tr> <td><img src="Logofinalcopy.gif"></td> </tr> <tr> <td bgcolor="aqua"><h2>Login</h2></td> </tr></table> <table align="right" style="width:40%"> <br> <tr> <td>username:</td> <td><input type="text" name="username"></td> </tr> <tr> <td>password:</td> <td><input type="password" name="password"></td> </tr> <tr> …

Member Avatar for phpuser
0
270
Member Avatar for cane23

i have an issue with the include function. i want to use the include function on a file that is in another directory. can anyone offer any assistance on how i go about doing this??

Member Avatar for as.bhanuprakash
0
85
Member Avatar for Pooja J.

Hi to all, I have two listboxes, one is state and another is city. As user changes the state, the value of city listbox w.r.t state shuld changed. I do it with using, but I want to do it when user make a selction from state listbox. //two-list.php [code] <?php …

Member Avatar for manishmannan
0
94
Member Avatar for MDanz

i have a top frame named link_frame. the bottom frame is named menu.php how would i get the url of the top frame? i need this in php not javascript. [code] $url = $_SESSION['url']= $url;[/code]

Member Avatar for manishmannan
0
70
Member Avatar for futhonguy

Hi I am trying to write/modify a script to read from a spreadsheet into mysql database using php. I did a search on google and found phpExcelReader. However i wasnt able to use that to do so. ALso managed to find an open script to read from excel spreadsheet onto …

Member Avatar for futhonguy
0
108
Member Avatar for retareed

I have text in a MYSQL database like such: "2/22/10 - Called Lisa today. She emailed the app. 2/8/10 - No response to previous email. Forwarded again today. 1/27/10 - Emailed Lisa Gregory to see how soon we can start the application process." The thing I'd like to do is …

Member Avatar for retareed
0
94

The End.