Jump to content

ack

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ack

  • Rank
    Member
  • Birthday 01/12/1950

Contact Methods

  • Website URL
    http://www.acksfaq.com

Profile Information

  • Gender
    Male
  • Location
    Independence, MO USA
  1. ...and the winner is: cyberRobot (with honorable mention to Jacues1) cyberRobot's 2nd suggestion worked perfectly. His first suggestion did not - mainly because of the "spaghetti coding" Jacues1 mentioned. I tried to embed the HTML by jumping from php to HTML and back to php inside a data record display loop using the php escape characters "<?php" and "?>". That was a massive failure... Keeping everything as a php script allowed proper execution of the database search without errors. This has been a very educational process! Thanks to all that responded!
  2. I am having trouble building an executable print string from text and table fields. I suspect it involves the use of single and double quotes used in building the string. Here are the variables and the assignment line: /* build the URL string */ $linkstr1 = '<A href="'JavaScript:newPopup("'; <-- error occurs here (line 183) $linkstr2 = $link; $linkstr3 = ') ;)">'; <-- another error probably happening here... $linkstr4 = $title; $linkstr5 = '</A> &nbsp '; $linkstr6 = $id_no; $w_icona ='<img src = "' ; $w_iconb = $icon ; $w_iconc = '">'; $strall = $linkstr1.$linkstr2.$linkstr3.$linkstr4.$linkstr5.$linkstr6.$w_icona.$w_iconb.$w_iconc ; echo $strall."\n"; echo"<BR>"; break; The error message: Parse Error: syntax error, unexpected T_String in........ on line 183 The code I am trying to dynamically create in the string variable $strall is: <a href="JavaScript:newPopup('http://www.URL_NameVariable.htm');">Title_variable</a> I am pretty sure the problem is with the second single-quote in the error line - I just don't know what I need to do to resolve the problem. Thank you in advance!
  3. Excellent assistance, mac_gyver! removing the 'i' solved the problem - which is now obvious to me. The resulting change revealed the true problem as being syntax useage in the query string. I shall study up on the PDO extension so that my pages do not "seize up" when GoDaddy next upgrades the server software. Again, Thank you!
  4. I am trying to add a record to a table. Using previously- functional code lifted from another project, the script dies at the mysql_query() line. I have confirmed that the information to be inserted is being passed properly from the form page, that the variables and field names match and are in sequence and the coding is correct. The problem I am having in debugging is that I cannot get an explanatory error message to generate. Here is a snippet (MySQL version 5.5.43-37.2-log on a Godaddy server) $query = "INSERT INTO linkdb (keywords.category,title,link,icon,id_no) values ($inkeywords,$incategory,$intitle,$inlink,$inicon,$inid_no)"; mysql_query($query) or die("error :".mysqli_error($connection)); "$connection" being the correct mysql_connect data. The error string generated by the server is: "warning: mysqli-error() expects parameter 1 to be mysqli, resource given in ......" The above line of code was adapted from page 350 of "PHP & MySQL Web Development for Dummies" by Janet Valade, whom I trust more than W3Schools... I suspect there may be a problem with the compatibility of the construction of the table and fields, but I am reluctant to change anything blindly as the table is currently in use on a website. How do I get the actual error information to appear? Your Humble servant, Ack
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.