38,020 Topics

Member Avatar for
Member Avatar for whitestream6

I'm getting a bit better at PHP, but the datetime with databases is proving hard to do for this particular bit of coding, no matter how much I practise! Here's my code (ignoring the database parts in the header): [CODE]//select the table $result = mysql_query("select * from epdata1 order by …

0
62
Member Avatar for takeshi

hi.. i'll ask some question regarding my system login part.. This is my databasae connection.. [CODE] <? include("constants.php"); class MySQLDB { var $connection; //The MySQL database connection function MySQLDB(){ /* Make connection to database */ $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error()); mysql_select_db(DB_NAME, $this->connection) or die(mysql_error()); function confirmUserPass($username, $password){ /* …

Member Avatar for takeshi
0
130
Member Avatar for Xamas

I'm wondering, should I do any advanced security checks for view-only ordering functions. [url]http://www.site.com/?product=shoes&order=[/url][B][COLOR="Red"]manufactured[/COLOR][/B]&ord=[B][COLOR="Red"]desc[/COLOR][/B] when I just only use this data in echo for pagination: [CODE=PHP]$i = 0; echo "<div> <a href='/?products=".$data['cat']."&amp;order=".$_GET['order']."&amp;ord=".$_GET['ord']."&page=".$i+1."'>NEXT PAGE</a>";[/CODE] JUST IN ECHO CASE. These $_GET's doesn't used anywhere else(ex. sql queries etc.)... ------------- Is there is …

Member Avatar for Atli
0
142
Member Avatar for 7akimz

this is my php code [CODE]extract($_POST); $doc = new DOMDocument; $doc->load('../order1.xml'); $laptops = $doc->documentElement; foreach($laptops as $laptop){ if($list==$laptop->name) { $name1 = $laptop->name; $oldnam = $laptop->removeChild($name1); $olddetails=$laptop->removeChild($laptop->details); $oldprice=$laptops->removeChild($laptop->price); $name1 = $laptops->getElementsByTagName('name')->item(0); $oldname = $laptops->removeChild($name1); }} $doc->save("../order2.xml");[/CODE] this is my xml [CODE]<?xml version="1.0"?> <?xml-stylesheet type = "text/xsl" href = "input.xsl"?> <products> <laptop> …

Member Avatar for Atli
0
141
Member Avatar for littlebear330

hi there, I'm trying to create a function to send email from localhost(postmaster@localhost) to other email accounts(yahoomail,gmail,hotmail).I'm currently using xampp and the mercury32 inside xampp.I had successfully sent email from localhost to localhost but I can't make it to send outside from localhost. This is the code and it works …

Member Avatar for Aamit
0
172
Member Avatar for luliana

this part of php that connected with db [CODE]$q2="select *from emp order by id"; $r2=mysql_query($q2)or dai("query faild:"mysql_error()); while($x=mysql_fetch_array($r2) { if($x["depno"]==10)//[COLOR="Red"]dose it right to use $x=["depno"]like this when i use the query select* from the table??[/COLOR] { echo"<tr><td>$x["emloyeeno"]</td>"; echo"<td>$x["employee name"]</td>"; echo"<tr><td>$x["address"]</td>"; echo"<td>$x["salary"]</td>"; $sum=$sum+$x["salary"]; } }[/CODE]

Member Avatar for smartness
0
187
Member Avatar for web3

Is it possible to make from exe file a web application? Here is the file i am trying to convert:

Member Avatar for Stefano Mtangoo
0
60
Member Avatar for mandysaini

Hi, I am a student in college and am using the college internet facility although the computer is mine. I want to host a Blog and I need to know if the PHP is enabled. How do I find out?

Member Avatar for digital-ether
0
140
Member Avatar for JimmyLloyd

Heya guys, i just had a quick situation i wanted to ask about. I've got a form created and when i submit it, $_POST contains 4 identical sets of data. Basically i had 3 separate table forms. One to collect information and enter a query, one to post the results …

Member Avatar for JimmyLloyd
0
134
Member Avatar for tunde011

[CODE]$filter = $HTTP_POST_VARS['att']; $result = mysql_query("SELECT * FROM postingbob WHERE category ='{$filter}' ")or die(mysql_error()); [/CODE] That's my php code which basically takes values from 'att' in my html form [CODE]<div class="vx_two" style="float:right"> <select id="two" title="Select a category" class="pinkselect" name="att"> <option value="Addictions">Sort By Category</option> <option value="Addictions">Default</option> <option value="Addictions">Addictions</option> <option value="Animals">Animals</option> <option …

Member Avatar for SKANK!!!!!
0
106
Member Avatar for gold2040

Hi people I have a basic shopping cart here, taken from a book "Build Your Own Database Driven Web Site Using PHP & MySQL" basic catalogue [CODE]<?php session_start(); if (!isset($_SESSION['cart'])) { $_SESSION['cart'] = array(); } if (isset($_GET['buy'])) { // Add item to the end of the $_SESSION['cart'] array $_SESSION['cart'][] = …

Member Avatar for SKANK!!!!!
0
132
Member Avatar for dmorrison2

Hi, im having a mental breakdown, iv created a script where a user will type a password into a box and if it matches the one in the config file then it creates a session. on all of my pages i have the following code. [CODE]<? session_start(); if(!session_is_registered(admin)){ header("location:login.php"); } …

Member Avatar for SKANK!!!!!
0
152
Member Avatar for pradeephc

how to get coresponing value present in database through radio button selection

Member Avatar for SKANK!!!!!
0
33
Member Avatar for futhonguy

Hi, I am tryin to store the time a user logged in into a session. However everytime the user logged out, the time stored is the logged out time. Can someone advise me how i should done it in order to store the time the user logged in? Thanks [CODE] …

Member Avatar for SKANK!!!!!
0
68
Member Avatar for Lakshith

I have 2 pages called email.php and sendmail.php.email (email.php directs to sendmail.php).I want to print the URL of email.php in sendmail.php How can i do it?

Member Avatar for SKANK!!!!!
0
77
Member Avatar for fuchsia555

is there any way to move files from old host to new host without upload the files from my computer i have asked my hosting about FXP but they doesn't support it can it be done by any way or by PHP script to archive the files in zip file …

Member Avatar for kireol
0
104
Member Avatar for accountholder

I want insert some rows into mysql, each row shold be like this: [code] <input name="code[]" value="{code item dari data mysql}" /> <input name="name[]" value="{nama dari data mysql}" /> <input name="hrg[]" value="{harga dr mysql}" /> <input name="qty[]" value="{qty diinput sendiri}" /> <input name="subt[]" value="{autocalculated saat mengisi qty}" /> [/code] The …

Member Avatar for accountholder
0
149
Member Avatar for ryan1987

hi i have a html page with a form. you enter information into the form then have a choice of 2 buttons. depending on the button you press you get taken to a different page. the php page commits the data you put into he form to the database then …

Member Avatar for sDJh
0
125
Member Avatar for LloydFarrell

Hi all, I have a form that works great, thats updates mysql db\table But id like the end user to enter his/her D.O.B. for that I have created 3 dropdown menus one for day, second for month and third for year..since I'm new to php Id like to understand \ …

Member Avatar for diafol
0
130
Member Avatar for Kligham

Hi, Is it possible to let my php script save the output that normally should appear on my screen, save it as an html page?

0
42
Member Avatar for veledrom

Hi, I need a PHP IDE that has versions for Linux and Windows and runs without wasting a lot of memory. Also, i want it to show what variables, class and function names are already in use. Am I asking too much? Thanks

Member Avatar for diafol
0
85
Member Avatar for Stefano Mtangoo

Hi all, I just fired Mandriva 2010 from my external HDD. I need to run PHP IDE and PHP/MySQL server running. I'm new to Linux so I need guide from you guys Thanks

Member Avatar for Stefano Mtangoo
0
64
Member Avatar for gohar1131

Does anyone has "Leave Application Format" where leave is categorised into SICK & EARN LEAVE, here one needs to enter information into mysql throught PHP and retrive it. I have few queries, how do I take care of following - (1) If any public holidays comes between SL or EL …

0
43
Member Avatar for futhonguy

Hi, I am currently trying to work on a multi search post method on my php script and incorporate with the pagination script too. At the moment, my single post method works well with the pagination script. However when i tried to add another search query where user is able …

Member Avatar for futhonguy
0
93
Member Avatar for LloydFarrell

Hi everyone, first of all, I'd like to wish everyone a very merry festive season and a happy new year for 2010 .... ;-) I am working on a registration that is going fine at the moment, when all fields are populated and the submit is pressed, the script checks …

Member Avatar for LloydFarrell
0
77
Member Avatar for whitestream6

I've got a simple PHP page with a list of events that are taking place at certain times on certain days, and this is my code: [CODE] <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORD"); //select which database you want to edit mysql_select_db("events"); …

Member Avatar for CFROG
0
144
Member Avatar for TheWhite

Theres a functionality that I need that is not built into the PHP source code. I would like to modify a .c file in the code, recompile, and then be able to execute the php function with the same name as the one I added to the .c in my …

Member Avatar for ShawnCplus
0
75
Member Avatar for madristaa

Hello friends, I have a very minor error, but i am not able to figure out which one is that. I have a simple form page and it goes to the another page and insert the values in database. But the thing is it inserts multiple rows in the database. …

Member Avatar for accountholder
0
83
Member Avatar for apicard80

I have a situation where I am updating a config file and I need a following include('config.php') to pick up the latest version of the file. Presently what I am getting is that the include picks up the previous version that had been included earlier. Here the scenario index.php: [code=php] …

0
33
Member Avatar for Kruptein

First: Yes I'm comparing apples to oranges but in this case it is kind of possible to compare them Context: I'm a php-developer for 3-4 years I think and I really like php, I also use python for 2 years. I recently came in contact with django (python framework) and …

Member Avatar for ShawnCplus
0
58

The End.