708 Posted Topics
![]() | |
Re: how are you going to use this number? after i know this i can tell you which solution (database, txt file, ect.) would be better. | |
Re: please give more DETAILED information. its really hard to help when i have no idea what option items or some items relates to. | |
Re: in upload.php you have many security problems you need to fix, but i can't see where you are adding the file data to the database. where is $content coming from in your code. after you fix that/explain to me what you are doing, try to view the image using [code] … | |
Re: this should do it. [code] <?php $array = array( 'Name'=>'fullname', 'Company'=>'company', 'Phone'=>'phone', 'Email'=>'email', 'Address'=>'address', 'City'=>'city', 'State'=>'state' ); $html = ''; foreach( $array as $title => $value ) { $str = ${$value}; if ( $str !== '' ) { $html .= "<span class=\"content\"><strong>{$title}:</strong> </span>\n"; $html .= "<span class=\"contentred\">{$str}</span><br />\n"; } } echo … | |
Re: this is more of a client side matter where javascript would solve your problem. you can have the chosen color sent to a php script that will process it. | |
Re: why don't you subtract one for the stock_level once the item is added to the orders_products table. thats how i would do it. | |
Re: look into fckeditor. it will do what you want and more. | |
Re: the queries on lines 16 and 20 will fail because your syntax is wrong (probably i simple typing error). it should read [code] $query = "SELECT * FROM `login`"; [/code] | |
Re: actually a system like this is quite simple. i have created a few and i am working with one on my newest project. i can share some of my code once i know how your system is set up so it will easily integrate into your site. | |
Re: first of all, mysql_escape_string is depreciated. use mysql_real_escape_string instead. is the script throwing any errors? | |
| |
Re: one word: google. google translations will help you a lot. A simple google search will give you your answers. | |
Re: to make it optional, you have to set the varible with a value in the function. ex. [code] <?php function test( $a,$b,$c='') { //do what you need } ?> [/code] | |
Re: don't store the images in a database. store the path to the image in the database and store the actual image on the server. | |
Re: use the $_GET array. you can "get" those values from the url by using: [code] $color = $_GET['color']; $shape = $_GET['shape']; [/code] make sure you validate those as well, especially if you are using those in a database query. | |
Re: try: [code] <?php define( "DATABASE_SERVER", "blah" ); define( "DATABASE_USERNAME", "blah" ); define( "DATABASE_PASSWORD", "blah" ); define( "DATABASE_NAME", "blah" ); //connect to the database $con = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD) or die(mysql_error()); mysql_select_db( DATABASE_NAME ); $sql = 'SELECT * FROM `users`'; $result = mysql_query($sql,$con) or die ('Error: '.mysql_error()); while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { … | |
Re: i was little confused as to why you had 4 address field, but i think this might work. i haven't been able to test it. [code] <?php include 'connect.php'; // Execute the SQL query and return records $result = mysql_query("SELECT * FROM tablename WHERE id = 1234"); while ($row = … | |
Re: have to script return how fast it was. Use something like microtime at the beginning of the script then do it again at the end and subtract them. See if you can find any difference. | |
Re: yeah, i never tested it. should of mentioned that. let me know the error and i will tell you whats wrong. also the sql query will fail. when a pasted into daniweb they changed the ` signs of the field names somehow. i don't see anything wrong with it, but … | |
Re: have a last login in the database and then if its blank for that user, highlight otherwise don't. if you have different areas on different pages, you might need to create a table for the pages and have the unique identifier the members id and then put a 0 or … | |
Re: i use this to display the code on my server so i don't have to ftp all the time to see errors. you can make some changes to it so it will work for you. just to let you know its not complete but works. i didn't add the extension … | |
Re: there is no space between the id and class for both fields. i doubt that would cause problems, but you never know. your code is over complicated. you need to simply it and write the html correctly. Many small problems are solved when things are done properly. | |
Re: why do you need to get the zip code when they are giving it to you? | |
Re: the only method i have seen is the code writing the database credentials to a php file. then using those, have the code create a database, then the necessary tables with the prefix. once that is done, then put the admin info into the right database table. | |
Re: is the code on usewebpage.php theirs or yours? | |
Re: why not use a comma seperated data file that can easily be processed with php. does the file have to be formatted that way? | |
Re: if you know php then making a signup form and processing code shouldn't be too hard. just store their info in a database. then make a simple login system. a visitor must login so you can identify who is playing your game so you can track information about it. the … | |
Re: turn register_globals off. its a php setting. | |
Re: look at this: [url]www.banditssoftball.org/show.php[/url] oh yeah, from what i know, php can be used in any type of file as long as the server is set up for it. | |
Re: does page1.php post to another page or itself? | |
Re: i personally don't recommend making a new table for every user. it may be organized but is difficult to deal with. i would make a users table, then any other tables you would need and you ids to reference info in different tables. | |
Re: did you view the source. sometimes pre tags don't work for me and i know that browsers like to hide php code. | |
Re: you log into your server with ftp and transfer the files. its pretty simple. | |
Re: i don't think there is a way to get a certain line with curl. you are just going to have to process the data returned with preg_match and a regex(regular expession). you could also try fopen with fgets to read the file line by line, put the lines into an … | |
| |
Re: where the form function? the error is showing because the script cant find the form function. | |
Re: i made an adjustment and cleaned up the code to make it easier to read. see if it works. [code] <?php echo '<tr>'; echo '<td width="255">'; if ($arr[6] !== 'Admin' && $arr[6] !== 'SysAdmin') { echo '<div align="center"><img src="images/bill.png" alt="Bill" /></div>'; } else { echo '<div align="center"><a href="underConstruction.php"><img src="images/bill.png" alt="Bill" … | |
Re: fill in the info below and then put this where you want the content displayed. i put some basic html stuff in there to show you what you can do. change this accordingly. [code] <?php //Database Info $host = 'localhost'; //usually localhost, but depends on how the server is set … | |
Re: do you really have to use frames. a css layout would be easier and make adding the background a simple task. | |
Re: all you need to do to destroy a session is call [code] session_destroy(); [/code] you don't need to unset variables before then. session_unregister is depreciated anyway. if you want to remove something like the uname part of the session array just use [code] unset($_SESSION['uname']); [/code] | |
![]() | Re: yes it does need to be checked. i use htmlpurify. its a pretty nice php application that will strip out bad information. |
Re: enrollment system for what? what exactly do you need it to do? | |
Re: i would use ajax for this if you don't want to refresh the page. otherwise have the form submit using onchange and then get the value via $_GET or $_POST | |
Re: why are you using the ../ folder. this means move up one directory. since you are finding the file from the root this is uneccessary. i guess after thinking about it, the file could be in a folder that is above the root directory. in that case, what is your … | |
Re: the server isn't reading the php code. did you set up apache to work with php. also, fyi the browser doesn't read php code, the server does. | |
Re: you didn't escape every " in the html you are echoing. you need to add a \ before the quotation. | |
Re: i really don't think this is a php problem. anyways: do you have an example? also, do you have a doctype. |
The End.