516 Posted Topics
Re: Do your php at the top, before the doctype and html tags. The server doesn't care where you put the php. It just reads the script top to bottom. Put all the php that you can before the html. That way all you have to do in the html body … | |
Re: You're performing the query on line 3 but you don't select a database until line 9. You must select the db before you perform the query. | |
Re: What's the code look like? If you've never linked to an external site, then you need to understand that you have to add http:// to the beginning of the url: [icode]<a href="http://www.forums.myboard.com">link</a>[/icode] | |
Re: You'll probably get a better response by posting this in the JavaScript/DHTML/AJAX forum. | |
Re: Assuming a windows IIS server, to connect php to access, you'll need to set up an odbc and DSN on IIS. [URL="http://www.w3schools.com/php/php_db_odbc.asp"]Here's[/URL] a link to the tutorial. | |
Re: No, you'll need a server side script for that. PHP has a mail function that's pretty easy to use. [URL="http://www.thesitewizard.com/archive/feedbackphp.shtml"]Here's[/URL] a link to an easy to follow tutorial on how to do it. | |
Re: An easy way to validate is to install the free [URL="https://addons.mozilla.org/en-US/firefox/addon/60"]web developer[/URL] add-on in Firefox. Once installed, you can simply press Ctrl+Shift+A and the W3C validator will open in a new tab and validate the page that you were on. [QUOTE]With dreamweaver you start a new document, it always has … | |
Re: The php function can be called, but you'll need some javascript to send and recieve the xmlhttprequest (AJAX). | |
Re: You have to upload the images to the server. Notice how Ohio.gif works but the other 2 images dont. Here's the path to Ohio.gif : [url]http://www.ohiochirorelief.com/ohio.gif[/url] You need to put the 2 Dr.Rex images into the same folder that ohio.gif is in, [U]on the server[/U]. | |
Re: Have a look at [URL="http://www.search-this.com/2007/03/12/no-margin-for-error/"]this[/URL]. It explains exactly why things look different depending on the browser and what you can do to make things look more cross browser consistent. | |
Re: I had a similar problem integrating paypal. It was a security feature problem. I changed my allowScriptAccess and allowNetworking param values and it fixed things. Here's what I set the values at: <param name="allowScriptAccess" value="sameDomain" /> <param name="allowNetworking" value="all" /> | |
Re: It all depends on what db you are trying to connect to and your current server configuration. Lucky for you, php is one of the most highly documented languages on the web. It even has its own "user manual" so to speak at [URL="http://www.php.net"]php.net[/URL]. Utilize google. There are numerous tutorials … | |
Re: Use loadVars. Here is some code from a login for a similar project. I did it with ActionScript 2.0. What you need are three text boxes and a submit button. The first two text boxes (email and password) will be input text type with instance names of email and password. … | |
Re: on lines 44 and 45 of questions.php [code=php] $sql = 'INSERT INTO questions(question1, question2, question3, question4, question5, username, password) VALUES ("'.$question1.'", "'.$question2.'", "'.$question3.'", "'.$question4.'", "'.$question5.'", "'.$username.'", "'.$password.'");'; [/code] Is this insert working? The reason I ask is because you have );'; at the end. Try getting rid of that extra … | |
Re: [code=php]if(empty($_POST['username'])){ echo"Please enter username"; } if(empty($_POST['password'])){ echo"Please enter password"; }[/code] Obviously, you could do a lot of other checks like verifying the number of characters in each field with strlen. I just listed what you asked. I would recommend that you take some basic actions against SQL injection. The function … | |
Re: Are you surrounding it with single or double quotes? If double, then $query_string1 shouldn't be escaped. [code=php] echo "<a href='{$_SERVER['PHP_SELF']}?pageno=1&query_string=$query_string1'>FIRST</a>"; [/code] | |
Re: Looks like you don't have a conditional to trigger the mail to be sent. Try replacing the last 24 lines of contact_process.php with this: [code=php]// If everything is okay, send the message if ($name && $email && $city && $state && $phone && $occupation && $reason && $interest && $timeframe … | |
Re: [QUOTE]# //If user only enter Bicycle Type # elseif (($brandC="") AND ($typeC!=="") AND ($styleC== "All") AND ($frameC== "") AND ($groupSetC== ""))[/QUOTE] I do this occasionally. You are confusing the comparison operators. On line 39, where you have $brandC="", you're not comparing the string to empty, you're resetting the value to … | |
Re: Ah, the gdform. I tried for over a week to send mail through GoDaddy. My client had the small to medium sized business plan. I would test the code on different servers and it would work, but when I'd move it onto the GoDaddy machine, it would fail. I wound … | |
Re: Your php insert is happening as page 4 loads. Move the insert up to the top with the rest of the php. Also, surround the insert with a conditional to check if the smoke button has been selected and the submit button has been pushed i.e.: [code=php] if(isset($_POST['submit']) && isset($_POST['smoke'])){ … | |
Re: You must include session_start(); at the top of every page that you plan to use session variables. This may or may not be the problem, but it is easy to forget to do. | |
Re: External css should not contain style tags (<style type = "text/css"></style>) at the beginning and end like they do when putting them inline. If the styles aren't showing up, they probably aren't in the same place that you are pointing the link href to. Try typing the absolute address of … | |
Re: You'll need to know a little bit about what variables the paypal cart requires. If you're familiar with how it works in html, then you can do something similar in actionscript. Declare all the variables that normally are hidden in the form after the on(release){. In your buttons' action palette, … | |
Re: These variables will be empty if someone A.)gets to your site via a link with a target="_blank". B.)types the url directly into the browser C.)Came from a bookmark or favorite D.)Right clicked to open your link in a new tab/window | |
Re: Notepad defaults to the extension .txt. You must change the Save As Type drop down menu to all files. You can also wrap it with quotes to save as .php. | |
Re: Suggestions: Make sure that Apache is running. If you're not sure if it's running check the processes section of the task manager. Some versions of WAMP require you to manually start Apache. Also make sure you are previewing the file under localhost in the browser. Should look something like [url]http://localhost/wamp/[/url] … | |
Re: In valid CSS, the id is always unique and is only used once per page. If you have a common style for multiple divs, images, links, paragraphs, ... write a class for them. That being said, the css for the div id would be:[code=css] #text2{ position:absolute; overflow:hidden; left:325px; top:362px; width:143px; … | |
Re: Use php's date function to determine what to do. If you are pulling dates from the calendar, they'll have to be in the same format as the date function. The following variable, $today, will echo or print out January 25, 2008. [code=php]$today=date('F d, Y');[/code] Now compare the $today variable and … | |
Re: Do a SELECT to find the user_id for the current user in the USER table. Assign the user_ID to a variable, $user_ID. Now do your UPDATE on the USER_INFORMATION table using WHERE user_ID='$user_ID' | |
Re: Create a .php file with your connection information. Something like this: [code=php] //connect.php <?php $dbhost = 'localhost'; $dbuser = 'username'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); $dbname = 'dbname'; mysql_select_db($dbname); ?>[/code] Now store it on the server above the root. When you are … | |
Re: Yes, use the substr function: [code=php] $script = substr($script, 0, -2); [/code] If this trims too much, try changing the -2 to -1. | |
Re: I also think that Firefox is slightly faster to load and deliver pages. It's ten times faster to install. It also has tons of free addons. My favorite is Web Developer. It gives you a menu full of developer tools that allow you to use custom css pages, disable javascript … | |
Re: The easiest way to do this is with $_SERVER['HTTP_REFERER']; This will tell the server what page referred them to that page by. Because http is a stateless protocol, this can be easily manipulated though. Another way would be to set a variable on a previous page that could be passed … | |
Re: [code=mysql]ALTER TABLE jos_afm_cats add column date TIMESTAMP ; [/code] This will add a field called date which will record the date and time that the value was entered. Then when you pull the data using a SELECT command, use ORDER BY date DESC at the end of the query. So … | |
Re: To find out if an id is being passed, can you test the data_fetch.php page using a sample id in the query string? In other words type the url into the browser and include an id that you know is in the database. Like this: [url]http://www.domainname.com/data_fetch.php?id=23[/url] This will at least … | |
Re: You would probably get a better answer if posted in the JavaScript forum. The idea would be to create a function that enabled one textbox while disabling the rest. Replace the word form with the forms name. [code=JavaScript] <script type="text/javascript"> <!-- function changestate() { if(document.form.r1.checked) { document.form.t1.disabled='false'; document.form.t2.disabled='true'; document.form.t3.disabled='true'; document.form.t4.disabled='true'; … | |
Re: newcountry, sql injection is not desirable. You want to download it? Sorry it's not some open source program you can download. SQL injection is a technique used by hackers to exploit your database. It can be used to view, update, or delete data, without the knowledge of the db admin. … | |
Re: This is the absolute simplest way to do it. You'll have to take measures to prevent sql injection and implement other security features. Place a link on the returned result like this: [code=php] echo" <a href='whatever.php?name=$name'>$name</a>"; [/code] It would look something like: [URL="http://www.whatever.com/whatever.php?name=Bill"]Bill[/URL] [URL="http://www.whatever.com/whatever.php?name=Bob"]Bob[/URL] [URL="http://www.whatever.com/whatever.php?name=Sue"]Sue[/URL] Obviously, you'll have to replace … | |
Re: Stupid question. Where is your connection to the database? | |
Re: Try opening my_htm.html with Firefox or IE and copy the URL at the top. Now paste it into the value in your data attribute. It should start with C:/ I believe it will be something like:[code=html] <object data ="C:/AA/bin/my_html.html" width="500" height="300"></object>[/code] Edit: I can only get this to work in … | |
Re: Get rid of the single quotes around your table name and field name. $sql = "INSERT INTO addurl (u_link) VALUES ('$URL')"; | |
Re: [url]http://php.about.com/od/advancedphp/ss/php_sessions_3.htm[/url] | |
Re: Very close. Remember, variables are case sensitive. <input type="text" name="username" maxlength="12"/> Then in the php you have: $Username = $_POST["Username"]; Should be: $Username = $_POST["username"]; The same goes for email, wing, and comment. Looks like your getting the hang of it though. | |
Re: Yes it could be done. I doubt that many people would want to login off of your server though. Too much phishing going on these days. | |
Re: The Firefox error console ([U]T[/U]ools->Error [U]C[/U]onsole) says "Unexpected end of file while searching for ',' or '{'. Ruleset ignored due to bad selector. " It also has a link under that, when clicked, shows the source code for your css and highlights the first line of code(/*******************). This tells me … | |
Re: Any server side language can do this. I suggest PHP but you could use any server side language(ASP, JSP, Coldfusion...) . To authenticate the user, you'll have to use a login page. Then you can deny access to the site for any user not logged in (inaccessible to the general … | |
Re: SELECT * FROM mytable WHERE MATCH(title,content) AGAINST('+search* ~term' IN BOOLEAN MODE) ORDER BY relevance DESC; Have a look at [URL="http://www.joedolson.com/boolean-query-in-mysql.php"]this[/URL] for more information. | |
Re: View the source code on the page. Find the class name you want to modify and assign css to it. Here's an example: [code=html] //This is the source code: <span class="blacktext12"> <span id="ctl00_Main_ctl00_UserNetwork1_ctrlMessage">bill is in your extended network</span> <br> </span> [/code] Now assign some css properties to that class: [code=css] … | |
Re: Pick the row you want to alphabetize and use the ORDER BY clause. [code=mysql]SELECT * FROM table ORDER BY name DESC;[/code] ASC can also be used to sort ascending. |
The End.