39,323 Topics

Member Avatar for
Member Avatar for maemaumeow

[CODE] <select name="year"> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> </select> <input type="submit" name="sub" value="Search"/> </div> <?php if(isset($_REQUEST['sub'])){ $year=$_REQUEST['year']; $con=mysql_connect("localhost","root","")or die( "Unable to connect"); mysql_select_db("mydb",$con) or die( "Unable to select database"); $query="SELECT * FROM student WHERE EnrolledYear='$year'"; $result=mysql_query($query)or die(mysql_error());; $num=mysql_numrows($result); mysql_close(); ?> <table> <tr> <th>Student ID No.</font></th> <th>Name</font></th> <th>Enrolled …

Member Avatar for ddymacek
0
151
Member Avatar for rahulvramesh
Member Avatar for IIM
0
99
Member Avatar for codeorder

Hello everyone. I'm new to this forum and PHP in general. I finally got the nerve to tackle a mySql Database on my website's server, added columns and a few values, although I cannot seem to find any online help to retrieve the values from the database table. Here is …

Member Avatar for codeorder
0
178
Member Avatar for altarek

Script is executed in a long time in the end does not display results ?

Member Avatar for adkhan
0
48
Member Avatar for chris_j_haines

Hello Before I show you my code I would just like to put forward to whoever is willing to help me, and I have spent the last 2 days looking at hundreds of different login scripts and my head is hurting as the more I look at them the more …

Member Avatar for chris_j_haines
0
174
Member Avatar for chris_j_haines

Hello I have been reasearching many sites regarding encryption, I am a bit lost. I can cryp() the password with $salt but when I go to login and compare the passwords it keeps taking me back to the login. I have taken out all the encryption code but below is …

Member Avatar for chris_j_haines
0
125
Member Avatar for itisnot_me

ok so after some time i can do some simple reg exp but this one is confusing me. I currently am testing my reg exp on regexpal.com but php wants to work differently this is what im using [CODE] preg_match_all('/{(\w+)(([:]\w+)*)}/', $page_content, $matches, PREG_SET_ORDER); foreach($matches as $match) { $src = $match[1]; …

Member Avatar for pritaeas
0
132
Member Avatar for Jamesiscrazzy

Right now i have 6 files: Main.php = The login page Info.php = The first page seen after login ForgetPass1.php = The first page for password recovery ForgetPass2.php = The first page for password recovery functions.php = Holds all the php functions used in all websites including: -logout() -confirmUser() -SQL_Connection() …

Member Avatar for Jamesiscrazzy
0
234
Member Avatar for ErangaD

Hi I am very new to PHP I have two text boxes A and B when I open the web page A is already populated with a number if I input a number in B I want that number to be subtracted by A (A-B) and the answer should be …

Member Avatar for decade
0
117
Member Avatar for pjh1985

Hi, I am developing a CMS based website which also has a flash gallery, the gallery accepts only xml data as input so i am using info from a database to output the required xml using php. I am setting the page that is currently being viewed using a session, …

Member Avatar for decade
0
264
Member Avatar for uselessninja

hi i have a code that uploads an image...but it gives me an error when i upload a photo: Warning: move_uploaded_file(test/ssss.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\xampp\htdocs\test\add.php on line 21 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\xampp\tmp\php163.tmp' to 'test/ssss.jpg' in C:\xampp\htdocs\test\add.php on line 21 …

Member Avatar for uselessninja
0
114
Member Avatar for youvi

See this is the URL path to access my local server.. "http://localhost/CodeIgniter/" I need to change this URL and need to give my own URL..after adding my URL i need to access my local server using my own URL... How can i do that??please help me...

Member Avatar for IWDesigns
0
161
Member Avatar for sid78669

I have a javascript code that modifies the data for a hidden field on the page. The page is then submitted to php. The problem is although I can see the altered data in firefox when I select the section and do show source for selection, the modified data in …

Member Avatar for sid78669
0
192
Member Avatar for phorce

Hello, I want to create a DDoS prevention script, but I don't know which is the best way to go about it. What I was thinking is that, when a user attempts to connect to the website, it records their IP and then if there is loads of traffic, it …

Member Avatar for happytogether
0
96
Member Avatar for Tristan2036

Okay i have been looking my best for this problem on forum. I have a website script written in php, now the menu it has is in php and uses a tpl file. This is very crude compared to what i need, now i post here in DHTML because the …

0
65
Member Avatar for Hani1991

Hey.. I wonder what's the difference between the use of [COLOR="Green"]||[/COLOR] and [COLOR="Green"]OR[/COLOR] I have an example: [CODE] $Assumed_Variable = 1; $Assumed_Query = mysql_query("select something from someTable",$connection); if($Assumed_Variable == 1 || mysql_num_rows($Assumed_Query) > 0){ echo 'Success!'; } else{ echo 'Failure!'; } [/CODE] So, if I understand this issue, this means …

Member Avatar for Pro2000
0
159
Member Avatar for smrict

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\emohonv2\module-srksmka-spi.php:116) in C:\xampp\htdocs\emohonv2\auth.php on line 3

Member Avatar for chrishea
0
254
Member Avatar for rajeesh_rsn

Hi Friends , I m new to Joomla and I developed a admin part component and after successfull data insert I need to do a redirect to my component view. My doubt is how to do this redirection from my "Model" I got a code Like this [ICODE]$msg = 'A …

Member Avatar for ko ko
0
102
Member Avatar for manchurianCEO

I posted this once but no one is stopping by so maybe the title didn't sound much interesting. I got the code for a google search bar and pasted it on the corresponding <div id and made a separate file for the search results and worked perfectly. But when I …

Member Avatar for almostbob
0
260
Member Avatar for dave1808

Hi, so what i am trying to do is this: If someone types in an invalid url of my domain (eg: mydomain.com/place-that-doesnt-exist) I want the user to be redirected to the index page where a message says "you tried to go to mydomain.com/place-that-doesnt-exist but there is no page there. It …

Member Avatar for MagicMedia
0
95
Member Avatar for IWDesigns

hi everyone. i am trying to make a code which will act as a checkbox, but will be hidden from view, only to be used by people who know its there. it is part of a form and im a bit stuck, i was hoping to use a checkbox but …

Member Avatar for almostbob
0
61
Member Avatar for masterjiraya

body.php [code=php] <html> <head> <script type="text/javascript"> function showUser(str, query) { if(document.getElementById("Author").checked==true) { query="author"; }else if(document.getElementById("bookname").checked==true) { query="bookname"; }else{ document.getElementById("textHint")="please select"; } if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() …

0
92
Member Avatar for arsala211

php code for form vilidation the form consiste on the following filed name,email and password .

Member Avatar for IIM
0
71
Member Avatar for mybluehair

I'm creating a web app that will use Twitter API's and OAuth so that my app can post to my users twitter accounts. Here is where I'm at so far - I get to the twitter authorization page. Authorize the app to be able to post to my twitter account, …

0
64
Member Avatar for zack654

So, I am running this PHP script and it's execution lasts for about 10 minutes or maybe even longer ( don't ask me what I'm doing :|;) ) After it's done, my PC runs slow, it probably eats up resources (don't which resources) so which command to use to free …

Member Avatar for zack654
0
234
Member Avatar for lisaroy1
Member Avatar for novice02
0
145
Member Avatar for manchurianCEO

I tried to put a google search bar in a website. First time I pasted the whole code within the <div id="search_bar"> </div> and it was all smooth. However I want to control it from a php file. I tried to include it through .php (files are already .php ) …

Member Avatar for manchurianCEO
0
164
Member Avatar for longinokamugish

MARITAL STATUS IS ON LINE 26 FROM THE FOLLOWING CODE. <?php // Get values from form $SURNAME=$_POST['SURNAME']; $MIDDLENAME=$_POST['MIDDLENAME']; $FIRSTNAME=$_POST['FIRSTNAME']; $COLLEGE=$_POST['COLLEGE']; $MARITAL STATUS=$_POST['MARITAL STATUS']; $GENDER=$_POST['GENDER']; $PHONE NUMBER=$_POST['PHONE NUMBER']; $ROOM NAME=$_POST['ROOM NAME']; $GURDIANS NUMBER=$_POST['GURDIANS NUMBER'];

Member Avatar for Pro2000
0
112
Member Avatar for kyleo92

Okay, I used a tutorial from nettuts to create a log in form, so that's done. However, I would now like to create a form to update a scoreboard powered by a database (unless there is another method that may be more efficient. I have four teams and thus four …

Member Avatar for rv1990
0
144
Member Avatar for jj.amonit

I have a system where there is a list of items. each has these three fields id - unique to each item. The index field for the db name - not unique date - not unique I just started using arrays, and am not that proficient. Also, I haven't worked …

Member Avatar for jj.amonit
0
96

The End.