- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
56 Posted Topics
I have around 20 tables in my database. I want to count every row of every table using COUNT and get a total. I have tried doing a separate select statement for each table then using UNION but I cannot find a way to join the results to get just … | |
Hello, I have a div (#disclaimer) that has the css property of "display:none." The following jquery script is supposed to show it when the #test select option is clicked. The #quest,#comp,and #other divs are supposed to hide it again. It works fine in FF but does not work in IE. … | |
Re: Well my first thoughts on this are that no variable is being passed, and the browser is checking them both because it finds the words "checked" as you said. Have you looked at the source on the page to see if you are seeing checked=checked for both inputs? My guess … | |
Re: The only problem I see is that you have it concatenated but it doesn't look like it needs to be because you are not outputting anything to the browser. I also don't understand why the comma is there. [code=php] foreach ($_POST['opid'] as $opid ) $opids = ((int)$opid); [/code] | |
I have a while loop and I am trying to associate a number with each line that increments by 1. I am sure this is probably something simple, I am not sure why I am struggling with it. Here is an example of that I have: [code=php] <?php $counter = … | |
Re: Try this: [code=php] <select name="cars"> <?php while ($row=mysql_fetch_array($result)) { ?> <tr> <tb> <option value="" selected>Select </option> <option value="cars_id"><?php echo $row['cars_id'] ;?></option></br> <option value="registration_number"><?php echo $row['registration_number'] ;?></option></br> <option value="make"><?php echo $row['make'] ;?></option></br> </tb> </tr> <?php } ?> </select> [/code] But what are you trying to accomplish with the drop down menus? … | |
Re: Try this [url]http://www.macronimous.com/resources/Converting_HTML2PDF_using_PHP.asp[/url] It should allow you to convert the file to a pdf, then it may be easier to convert from pdf to png or whatever format you want. | |
Re: Based on what I found from php.net, you can try this. [code=php] <?php session_start(); $cart[0] = array('item_number' => '12345', 'qty' => '5'); $_SESSION['cart'] = base64_encode(serialize($cart)); header('Location: test2.php'); exit(); ?> [/code] [code=php] <?php session_start(); print_r($_SESSION); print_r($_COOKIE); $cart = unserialize(base64_decode($_SESSION['cart'])); print_r($cart); phpinfo(); ?> [/code] | |
Re: Put this into a PHP file: [code=php] <?php echo '<script type="text/javascript"> $(document).ready(function () { $("#test").rssfeed("..news.xml", { limit: 3 }); }); </script>' ;?> [/code] Then in your <body> use: [code=php] <?php include("news.php"); ?> [/code] Don't quote me on the concatenation, you may have to play around with the syntax (change some … | |
[code=php] $results = mysql_query("SELECT column1, column2, date, time FROM table ORDER BY RAND() LIMIT 1"); $row_table = mysql_fetch_assoc($results); [/code] For some odd reason this does not return data, however if I change it to: [code=php] $results = mysql_query("SELECT column1, column2, date, time FROM table ORDER BY RAND() LIMIT 2"); $row_table … ![]() | |
Re: For 1200$ you should be able to build a quite powerful machine. I will get into more details than the previous posts. My main question, is if you are going to use any of your previous parts. Case, hard drive, mouse, keyboard, etc, or do you want to replace everything? … | |
Re: I would imagine the validation is taking place with something like if(isset($_GET['field'])) and this code would need to be changed. But without seeing your form code it is impossible to say. | |
Re: teajayo, Unfortunately there is no simple solution for this. In case you don't understand the reason it is happening, I will explain. When the user enters the special characters in the text field or text area, it can interfere with the MySQL query. Therefore, before entering the data into the … | |
Re: So you are referring to something like this? <a href="whatever.com?variable=value">Example</a> There are a lot of reasons, but the main reason I use them is to capture something specific in order to use it later. For example, say you've got a forum like daniweb. Each thread is essentially assigned an id … | |
![]() | |
Re: It won't be a session cookie, those should be destroyed once the user logs out. The most efficient way would be to use a client side cookie. I am sure if you google this you can find a specific example, or even on these forums. See what you can find … | |
Re: Have you tried to echo the $primary variable to see if it contains a value? | |
Re: [code=php] if($user= "admin"){ print '<a href="page.php" class="enabled-link">Admin Section</a>'; } else{ print '<a href="" class="disabled-link">Admin Section</a>'; } [/code] Why not just take the href out all together? Like so. CSS: .disabled-link { color: gray; } [code=php] if($user= "admin"){ print '<a href="page.php" class="enabled-link">Admin Section</a>'; } else{ print '<span class="disabled-link">Admin Section</span>'; } [/code] … | |
Re: That message is basically telling you that the MySQL query failed. Do all the rows, cols, fields in your MySql query exist in the database? | |
Re: Hopefully this will help you out: [url]http://www.ibm.com/developerworks/library/os-xmldomphp/[/url] | |
Re: Yep, right here. [url]http://www.php.net/manual/en/book.ldap.php[/url] | |
Re: Sounds like they may be on a different subnet, possibly one on the LAN and one on the WLAN? Are the IP's the same besides the last octet? i.e 192.168.1.xxx? | |
Re: Try this. [code=php] session_start(); $tabname = $_SESSION['username']; $s1 = sprintf("select * from '$tabname'" ); $result = mysql_query($s1); if(!$result) { $s2 = "CREATE TABLE '"$tabname"'(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), input VARCHAR(50))" or die(mysql_error()); mysql_query( $s2 ); } [/code] ![]() | |
I have the following AJAX script: [code=javascript] function callAHAH(url, pageElement, errorMessage) { document.getElementById(pageElement).innerHTML; try { req = new XMLHttpRequest(); /* e.g. Firefox */ } catch(e) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); /* some versions IE */ } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); /* some versions … | |
Re: There are different subsets of the 403 error, the forbidden is just generalized. What were you doing when you got the error? | |
Re: Why did you start a duplicate thread? Mark one or the other as solved. I would just start at the beginning and go from there. First of all, start with line 1, you could do something like this: [code=php] if($response->IsApproved()) { echo "Approved"; } [/code] This at least tells you … | |
Hello All, I had not been able to reliably send emails with the PHP mail function. So I decided I would use the PEAR extension instead, but I am having the same issue. I am not connecting to an SMTP server. The issue appears to be that I cannot send … | |
Re: Well one problem that stands out is that you are missing some curly brackets. Looks like you need an opening curly bracket on lines 193, 197, and 200 then a closing bracket on line 202 to open/close your if conditions. For HTML you may also need to specify the MIME … | |
I have a script that generates random data into an array then uses a while loop to display the data. I have a separate script that takes a row from that array and inserts it into a MySQL database. The problem I am having, is that every time the page … | |
Re: You mean... three four five six seven <?php echo "car" ?> eight nine ten eleven twelve? Or...<?php echo "three four five six seven" ?> car <?php echo "eight nine ten eleven twelve" ?>? | |
Re: [QUOTE=motters;1166225]hi does any one know why this code won't display my links[/QUOTE] [CODE] <div id="columnRight"><div id="innerColumnRight"> <div class="marginBox"> <h1>Second Menu</h1> <!-- Vertical Navigation Start --> <div id="navVertical"> <ul> <?php do { ?> <?php echo '<li><a href="'. $row_website_domain['website_domain'] . 'content.php?id=' . $row_side_bar['id'] . '">' . $row_side_bar['title'] . '</a></li>'; ?> <?php } … | |
Hello DaniWebbers, I've got several href's that take the user to different forms. However, in order to have access to the forms, they have to log in. So when they click the link, they are redirected to a login page if they have not already logged in, otherwise they are … | |
Re: Just69, What CMS' have you tried? I would imagine Joomla could do this. If not by default, there are also extensions you can install to meet your specific needs. | |
I have a javascript that displays a countdown in the browser. The problem is that if the element does not load immediately the countdown turns to negative. Here is the script: [code=javascript] <script> var time = 10; //How long (in seconds) to countdown var page = '<?php echo $page ?>'; … | |
Re: Well the first problem is that is a WD drive. Make sure when you run chkdsk that you run chkdsk /r from the command line. Or you can also right click on the drive in my computer > properties > tools > check now. Then put a check in both … | |
Re: Well lets start with the version of XP you are using and your browser version. Are you running XP SP2 SP3 etc....What browser and version? | |
Re: So in your connect.php script, after your query, put something like: [code=php] $_SESSION['user'] = $row['user']; $_SESSION['pass'] = $row['pass']; [/code] Then in your login script, replace [code=php] $user = $_COOKIE['user']; //gets the user from the cookies $pass = $_COOKIE['pass']; //gets the pass from cookies [/code] With [code=php] $user = $_SESSION['user']; $pass … | |
Re: I have a few questions about this. Is the form we are talking about a login form? What is the purpose of this random number? ![]() | |
Re: First of all what type of email are we talking about here? Is it HTTP (web-based), POP3, IMAP? By default POP3 servers will not store a copy of the emails on the server, you have to enable that within Outlook. And if that is the case, Freak is probably right, … | |
Re: Bryce, Your video card is the actual hardware in your computer. The driver is the software that allows the operating system (Windows) to communicate with it. If you are having trouble with games you always want to try downloading the latest video driver from the manufacturer (Nvidia and ATI are … | |
Re: Sounds like it probably is a virus of some sort. I noticed you are running McAfee, is the subscription still active and are the definitions up to date? If not, take care of that or go to trend micro's housecall and run a scan. Could you post pics of your … | |
Re: The first thing you would need to do is put the data into a session so it can be accessed later. So in your login form, when you gather the database info do something like: [code=php] $_SESSION['color'] = $row['color']; [/code] Then on your form itself do something like: [code] <form … | |
Re: PHP has the date function, but that is used more as a timestamp. Which would be great for entering the data into your database. But if you are looking for a real time clock that is displayed, javascript would be the way to go. | |
I am using AHAH to echo HTML lists to a div with PHP. The AHAH portion is working perfectly. The problem, is that even though the HTML is echoed and displayed, when I view the source of the page there is no HTML there. Typically with just PHP you would … | |
I am not really sure where to go with this, but any help I can get would be appreciated. What I am trying to do is put together an array to use with a foreach loop by getting columns from multiple tables. Here is my query: [code=php] $results = mysql_query("SELECT … | |
In order for my users to log in they have to activate their account through email. The activation works fine. The trouble I am having is displaying a message at login if the user has not activated. Here is the activation script: [code=php] <?php require "connect.php"; if(isset($_GET['u'])){ //make sure that … | |
I have a cookie script that creates a cookie from a session variable, the only problem is when the session is destroyed the cookie is deleted even though I set the expiration to a year. What can I do to prevent this? | |
I have a form that gives the user an option to upload a file. The field is optional, but if they do not upload a file I would like to insert a default image into the database. At one point it was working but I can't seem to figure out … | |
I am trying to echo two predefined variables, on the same line, with a space in between them. I am also hoping to use either ucfirst or ucwords to capitalize the first letter of each word. But to my understanding these only work with a string. Here is the code … | |
I have tried several combinations and just can't get this right. I am getting "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 '* FROM bookmarks WHERE bid = 11' at line 1" when … |
The End.