Asked  2 Years ago    Answers:  5   Viewed   49 times

In my form I have the following values that are based on a standard PHP/MySql query.

echo "<tr>n
        <td align='right'><b>Location</b></td>
        <td><input name='student_location' type='text' size='25' style='font-weight: 700' value=$location></td>

When the value of $location is a single word it displays properly, when it is more than one word say 'North Campus' only 'North' displays.

I've doubled and triple checked and the correct value is in the database, when I do an echo for the value of $location it echoes the correct value but when it's displayed in the field above it chops the last word. It's doing it to all of my variables that are more than one word, so I've missed something obvious.



You forgot quotes :

echo "<tr>n
    <td align='right'><b>Location</b></td>
    <td><input name='student_location' type='text' size='25' style='font-weight: 700' value="$location"></td>

Without quotes, the first word will be noted, others will be interpreted as wrong attributes.

Thursday, October 6, 2022

Based on your screenshot of Settings (Preferences on Mac) | Editor | Language Injections.

Please delete 3rd language injection rule from the bottom (the one for "div" -- that has "IDE" in Scope column).

That rule injects HTML into div tag which tells IDE to treat all other code (even PHP) inside such tag as HTML/plain text.

Sunday, October 9, 2022

A recent change in PHPMailer allows Debugoutput to be a closure, so you can make it do whatever you like, for example to collect all the debug output and emit it later:

$debug = '';
$mail->Debugoutput = function($str, $level) {
    $GLOBALS['debug'] .= "$level: $strn";
echo $debug;
Wednesday, August 10, 2022

Here you go:

It's a combination of the two you posted. With natural ordering they all have the same index. So using this concept, we toggle between 0, 1, and 2.

I slowed it down (helps a lot) and used a background color to see the frames change.

Here's the key part:

@-webkit-keyframes flipT {
    from{-webkit-transform:rotateX(0deg); z-index:1;}
    10% {-webkit-transform:rotateX(-180deg);}
    90% {-webkit-transform:rotateX(-180deg);}
    91% {-webkit-transform:rotateX(0deg); z-index:0;}
@-webkit-keyframes flipB {
    from{-webkit-transform:rotateX(180deg); z-index: 2;}
    10% {-webkit-transform:rotateX(0deg);}
    18% {-webkit-transform:rotateX(0deg);}
    19% {-webkit-transform:rotateX(180deg); z-index: 0;}

Here's the final version:

Thursday, October 20, 2022

Without fully following how you want the layout to appear. There are a couple of issues with the posted code. First in the for loops where you are adding the text to the first table, I am not sure what you are doing with the following lines:

objTab1.Rows[iRow++].Range.Text = s;
objTab1.Rows[iRow].Range.Font.Bold = 1;

The iRow++ increment in the first line is going to throw off where the row is in the table. I am guessing you may want:

objTab1.Rows[iRow].Range.Font.Bold = 1;
objTab1.Rows[iRow].Range.Text = s;

The other issue is how the code is getting the last paragraph like below:

object oRng2 = objDoc.Bookmarks.get_Item(ref objEndOfDocFlag).Range;
objPara3 = objDoc.Content.Paragraphs.Add(ref oRng);

The oRng2 range is the end of doc range however, the next line uses oRng which is the top of the document. Changing the add paragraphs to the proper range should fix this.

objPara3 = objDoc.Content.Paragraphs.Add(ref oRng2); 

Hope this helps.

Friday, August 26, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :

Browse Other Code Languages